Shaped
Types
Type Classes
Functions
Total number of elements
O(n). Create tensor filled with zeros.
O(n²). Create an n×n identity matrix.
O(n). Transpose a 2D tensor (swap rows and columns).
O(1). Add a dimension of size 1 at the specified position.
O(1). Remove all dimensions of size 1.
broadcast :: forall shape target a. (KnownShape shape, KnownShape target, BroadcastValid shape target, Broadcast shape target (~target), VU.Unbox a)
#
O(n). Element-wise addition.
O(n). Element-wise subtraction.
O(n). Element-wise multiplication (Hadamard product).
O(n). Element-wise division.
O(n). Negate all elements.
O(n). Absolute value of all elements.
O(n). Square root of all elements.
O(n). Exponential (e^x) of all elements.
O(n). Natural logarithm of all elements.
O(n). Arithmetic mean of all tensor elements.
O(m·k·n). Matrix multiplication.
O(1). Convert a shaped tensor to a dynamic tensor.
Apply a function to a dynamic tensor if it matches the expected shape.
O(n). Convert tensor to a flat list (row-major order).