Fork me on GitHub

src/arraymancer/tensor/private/p_display

  Source Edit

Procs

func disp2d[T](t: Tensor[T]; alignBy = 6; alignSpacing = 3; precision = -1): string
Display a 2D-tensor   Source Edit
proc prettyImpl[T](t: Tensor[T]; inputRank = 0; alignBy = 0; alignSpacing = 4;
                   precision = -1): string

Pretty printing implementation that aligns N dimensional tensors as a table. Odd dimensions are stacked horizontally and even dimensions vertically.

inputRank is used to keep track of the original tensor's rank. alignBy is the spacing given each column in a sub-tensor. alignSpacing is the amount of space we want at least between the different columns. It's given separately for the special case of first columns (as they are left aligned and all others right aligned).

precision sets the floating point precision.

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