Skip to content

Commit

Permalink
Remove redundant parens.
Browse files Browse the repository at this point in the history
  • Loading branch information
athas committed Oct 17, 2024
1 parent 0433592 commit c8f5b28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ $ futhark pkg sync

```Futhark
> import "lib/github.com/diku-dk/autodiff/onehot"
> onehots (onehot.(arr (pair f64 f32))) : [][3](f64,f32)
> onehots onehot.(arr (pair f64 f32)) : [][3](f64,f32)
[[(1.0, 0.0), (0.0, 0.0), (0.0, 0.0)],
[(0.0, 1.0), (0.0, 0.0), (0.0, 0.0)],
[(0.0, 0.0), (1.0, 0.0), (0.0, 0.0)],
[(0.0, 0.0), (0.0, 1.0), (0.0, 0.0)],
[(0.0, 0.0), (0.0, 0.0), (1.0, 0.0)],
[(0.0, 0.0), (0.0, 0.0), (0.0, 1.0)]]
> grad (onehot.(f64)) f64.sin 3.14
> grad onehot.(f64) f64.sin 3.14
[-0.9999987317275395]
> grad (onehot.(arr f64)) (map f64.sin) [0, 1, 2]
> grad onehot.(arr f64) (map f64.sin) [0, 1, 2]
[[1.0, 0.0, -0.0],
[0.0, 0.5403023058681398, -0.0],
[0.0, 0.0, -0.4161468365471424]]
Expand Down

0 comments on commit c8f5b28

Please sign in to comment.