(rontolisp) docs
← Functions

linalg:ndim

(linalg:ndim a)

Returns the number of dimensions of a (numpy's np.ndim): 0 for a plain number, 1 for a vector, 2 for a matrix, and so on. It is the linalg spelling of array-rank, extended to accept scalars. For the dimension sizes themselves, use linalg:shape; for the total element count, linalg:size.