Fork me on GitHub
Arraymancer Technical reference Tutorial Spellbook (How-To's) Under the hood

Module exporting

Search:
Group by:

Procs

proc toRawSeq[T](t: Tensor[T]): seq[T] {.
noSideEffect
.}
Convert a tensor to the raw sequence of data.   Source Edit
proc export_tensor[T](t: Tensor[T]): tuple[shape: seq[int], strides: seq[int],
                                        data: seq[T]] {.
noSideEffect
.}
Export the tensor as a tuple containing
  • shape
  • strides
  • data

If the tensor was not contiguous (a slice for example), it is reshaped. Data is exported in C order (last index changes the fastest, column in 2D case)

  Source Edit