Scalar : Type -> Type- Visibility: public export
Vector : Axis -> Type -> Type- Visibility: public export
Matrix : (row : Axis) -> (col : Axis) -> NewAxisConsistent row [col] => Type -> Type- Visibility: public export
fill : Num a => All TensorMonoid (conts shape) => a -> Tensor shape a- Visibility: public export
zeros : Num a => All TensorMonoid (conts shape) => Tensor shape a- Visibility: public export
ones : Num a => All TensorMonoid (conts shape) => Tensor shape a- Visibility: public export
identityBool : IsCubical c => Tensor [c, c] Bool An identity matrix with True on the diagonal and False elsewhere
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
Visibility: public exportarange : IsCubical stop => Cast Nat a => Tensor [stop] a A range of numbers [0, stop>
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>
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:12571} : IsCubical x} -> {auto {conArg:12574} : IsCubical y} -> {auto {conArg:12577} : NewAxisConsistent (l ~~> (dim x + dim y)) shape} -> {auto {conArg:12586} : NewAxisConsistent x shape} -> {auto {conArg:12590} : NewAxisConsistent 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
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
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
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
Visibility: public exportoneHot : {auto {conArg:12845} : IsCubical c} -> Fin (dim c) -> Num a => Tensor [c] a- Visibility: public export
cTriBool : InterfaceOnPositions (c .cont) MOrd => TensorMonoid (c .cont) => (c .cont) .Shp -> Tensor [c, c] Bool- Visibility: public export
triBool : IsCubical c => Tensor [c, c] Bool- 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
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
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)
Visibility: public exportmaskedFill : Num a => All TensorMonoid (conts shape) => Tensor shape a -> Tensor shape Bool -> a -> Tensor shape a Fill the elements of a tensor `t` with `fill` where `mask` is True
Visibility: public exportsum : Algebra (Tensor shape) a => Tensor shape a -> a- Visibility: public export
mean : All IsCubical (toVect shape) => Cast Nat a => Fractional a => Algebra (Tensor shape) a => Tensor shape a -> a- Visibility: public export
variance : IsCubical c => Neg a => Fractional a => Cast Nat a => Tensor [c] a -> a- Visibility: public export
cumulativeSum : Num a => IsCubical c => Tensor [c] a -> Tensor [c] ainorder : Tensor [(b ~> BinTreeNode)] a -> Tensor [(l ~> List)] a- 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)- Visibility: public export
exMatrix : Ext (Vect 3 >< Vect 3) Double- Visibility: public export
applMap : Ext (Vect n >< Vect n) Double -> Ext (Vect n) Double- Visibility: public export
tTest : Tensor [("i" ~~> 800)] Double- Visibility: public export
tRes : Tensor [("i" ~~> 2), ("j" ~~> 400)] Double- Visibility: public export