Gather elements from data along axis using indices. Output shape matches indices. Ranks of data and indices must match. Sizes of indices dims != axis must be <= data corresponding dims.
Unfold (im2col) operation. Extracts sliding local blocks from a batched input tensor. For an input of shape (N, C, *spatial_dims), produces output of shape (N, C * prod(kernel_size), L) where L is the number of blocks. Works for any number of spatial dimensions.
Fold (col2im) operation. Combines an array of sliding local blocks into a tensor. For an input of shape (N, C * prod(kernel_size), L), produces output of shape (N, C, *output_size). Inverse of unfold. Overlapping values are summed. Works for any number of spatial dimensions.
Matrix multiplication. For 2D tensors, computes standard matrix multiplication. For higher dimensions, performs batched matrix multiplication on the last two dimensions, broadcasting batch dimensions as needed. The last dimension of the first tensor must match the second-to-last dimension of the second tensor.
vectors: If true (default), computes eigenvectors.
Input: Symmetric (real) or Hermitian (complex) matrix A (batched).
Output: (eigenvalues as float64, eigenvectors same type as input).
val op_triangular_solve :
upper:bool ->transpose:bool ->unit_diag:bool ->('a, 'b)t->('a, 'b)t->('a, 'b)t
Solve triangular system A*x = b or A^T*x = b.
upper: If true, A is upper triangular; else lower.
transpose: If true, solve A^T*x = b; else A*x = b.
unit_diag: If true, assume diagonal of A is all 1s.
Input: Triangular matrix A, right-hand side b (batched).
Output: Solution x.
val op_as_strided :
('a, 'b)t->Symbolic_shape.t->int array->int ->('a, 'b)t
Create a strided view of the input tensor with the given shape, strides (in elements), and offset (in elements). Backends that support arbitrary strided views (e.g., native with Bigarray) can implement this as zero-copy. Other backends may fall back to copying data if necessary. Raises if the view would access out-of-bounds memory.