Numy v0.1.2 Numy.Tz protocol View Source

Interface to Tensor.

Link to this section Summary

Functions

Get number of dimensions

Get number of elements

Link to this section Types

Link to this section Functions

Link to this function

data(tensor, nelm \\ -1)

View Source

Get number of dimensions

Examples

iex(1)> tensor = Numy.Lapack.new_tensor([1,2,3,4,5])
iex(2)> Numy.Tz.ndim(tensor)
5
iex(3)> Numy.Tz.nelm(tensor)
120

Get number of elements