Scalar : Type -> Type- Totality: total
Visibility: public export Vector : Axis -> Type -> Type- Totality: total
Visibility: public export Matrix : (row : Axis) -> (col : Axis) -> ConsistentWith row [col] => Type -> Type- Totality: total
Visibility: public export fill : Num a => AllC TensorMonoid shape => a -> Tensor shape a- Totality: total
Visibility: public export zeros : Num a => AllC TensorMonoid shape => Tensor shape a- Totality: total
Visibility: public export ones : Num a => AllC TensorMonoid shape => Tensor shape a- Totality: total
Visibility: public export identityBool : IsCubical c => Tensor [c, c] Bool An identity matrix with True on the diagonal and False elsewhere
Totality: total
Visibility: public exportidentity : IsCubical c => Num a => Tensor [c, c] a An identity matrix with ones on the diagonal and zeros elsewhere
Analogous to numpy.eye
Totality: total
Visibility: public exportarange : IsCubical stop => Cast Nat a => Tensor [stop] a A range of numbers [0, stop>
Totality: total
Visibility: public exportarangeFromTo : {default (TTInternalName ~~> 0) start : Axis} -> {auto cStart : IsCubical start} -> {auto cStop : IsCubical stop} -> Cast Nat a => Tensor [(stop .name ~~> minus (dim stop) (dim start))] a A range of numbers [start, stop>
Totality: total
Visibility: public exportflip : (axis : Fin rank) -> IsCubical (index axis (toVect shape)) => Tensor shape a -> Tensor shape a Reverse a tensor along a given axis
concat : {auto {conArg:12566} : IsCubical x} -> {auto {conArg:12569} : IsCubical y} -> {auto {conArg:12572} : ConsistentWith (l ~~> (dim x + dim y)) shape} -> {auto {conArg:12581} : ConsistentWith x shape} -> {auto {conArg:12585} : ConsistentWith y shape} -> Tensor (x :: shape) a -> Tensor (y :: shape) a -> Tensor ((l ~~> (dim x + dim y)) :: shape) a Concatenate two tensors along an existing axis, the first one
TODO extend to allow concatenation along an arbitrary/named axis
Totality: total
Visibility: public exportsize : Tensor shape a -> Nat Number of elements in a non-cubical tensor
size : All IsCubical (toVect shape) => (0 _ : Tensor shape a) -> Nat Number of elements in a cubical tensor
Totality: total
Visibility: public exportflatten : Foldable (Tensor shape) => Tensor shape a -> List a Flatten a non-cubical tensor into a list
Requires that we have Foldable on all the components
In general we won't know the number of elements of a non-cubical tensor at compile time
Totality: total
Visibility: public exportmax : Foldable (Tensor shape) => Ord a => Tensor shape a -> Maybe a Maximum value in a tensor
Returns Nothing if the tensor is empty
Totality: total
Visibility: public exportoneHot : {auto {conArg:12840} : IsCubical c} -> Fin (dim c) -> Num a => Tensor [c] a- Totality: total
Visibility: public export cTriBool : InterfaceOnPositions (c .cont) MOrd => TensorMonoid (c .cont) => (c .cont) .Shp -> Tensor [c, c] Bool- Totality: total
Visibility: public export triBool : IsCubical c => Tensor [c, c] Bool- Totality: total
Visibility: public export tri : IsCubical c => Num a => Tensor [c, c] a A matrix with ones on and below the diagonal, and zeros elsewhere
Analogous to numpy.tri
Totality: total
Visibility: public exportlowerTriangular : IsCubical c => Num a => Tensor [c, c] a -> Tensor [c, c] a Lower triangular part of a matrix. Elements above the diagonal are set to
zero. Analogous to numpy.tril
Totality: total
Visibility: public exportupperTriangular : IsCubical c => Num a => Tensor [c, c] a -> Tensor [c, c] a Upper triangular part of a matrix. Elements below the diagonal are set to
zero. Analogous to numpy.triu(.., k=1)
Totality: total
Visibility: public exportmaskedFill : Num a => AllC TensorMonoid shape => Tensor shape a -> Tensor shape Bool -> a -> Tensor shape a Fill the elements of a tensor `t` with `fill` where `mask` is True
Totality: total
Visibility: public exportsum : Algebra (Tensor shape) a => Tensor shape a -> a- Totality: total
Visibility: public export mean : All IsCubical (toVect shape) => Cast Nat a => Fractional a => Algebra (Tensor shape) a => Tensor shape a -> a- Totality: total
Visibility: public export variance : IsCubical c => Neg a => Fractional a => Cast Nat a => Tensor [c] a -> a- Totality: total
Visibility: public export cumulativeSum : Num a => IsCubical c => Tensor [c] a -> Tensor [c] a- Totality: total
Visibility: public export inorder : Tensor [(b ~> BinTreeNode)] a -> Tensor [(l ~> List)] a- Totality: total
Visibility: public export random : Num a => Random a => HasIO io => (shape : TensorShape rank) -> All IsCubical (toVect shape) => Applicative (Tensor shape) => Traversable (Tensor shape) => io (Tensor shape a)- Totality: total
Visibility: public export exMatrix : Ext (Vect 3 >< Vect 3) Double- Totality: total
Visibility: public export applMap : Ext (Vect n >< Vect n) Double -> Ext (Vect n) Double- Totality: total
Visibility: public export