Fork me on GitHub

src/arraymancer/tensor/accessors_macros_read

Search:
Group by:
  Source Edit

Macros

macro `[]`[T](t: AnyTensor[T]; args: varargs[untyped]): untyped
Slice a Tensor or a CudaTensor Input:
  • a Tensor or a CudaTensor
  • and:
    • specific coordinates (varargs[int])
    • or a slice (cf. tutorial)
    • or a boolean tensor or openArray mask with the same shape as the tensor

Returns:

  • a value or a tensor corresponding to the slice or to the true elements of the mask

Warning âš  CudaTensor temporary default: For CudaTensor only, this is a no-copy operation, data is shared with the input. This proc does not guarantee that a let value is immutable. Usage:

  Source Edit
Arraymancer Technical reference Tutorial Spellbook (How-To's) Under the hood