Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
Documentation
slice :: QuasiQuoter Source #
Generate a slice from a python compatible expression. When you take the odd-numbered element of tensor with `tensor[1::2]` in python, you can write `tensor ! [slice|1::2|]` in hasktorch.
lslice :: QuasiQuoter Source #
Generate a lens from a python compatible expression. When you take the odd-numbered elements of tensor with `tensor[1::2]` in python, you can write `tensor ^. [lslice|1::2|]` in hasktorch. When you put 2 in the odd numbered elements of the tensor, you can write `tensor & [lslice|1::2|] ~. 2`.