proc ndim(arr: NDArray): int {....raises: [], tags: [], forbids: [].}
Gets the number of dimensions.
Returns: Number of array dimensions
Example:
let arr = newOnes(@[2, 3, 4]) echo arr.ndim # 3
proc print(arr: NDArray; name: cstring = nil; precision: cint = 2) {....raises: [], tags: [], forbids: [].}
Prints the array to standard output.
Parameters:
let arr = newOnes(@[2, 3]) arr.print("My Array", 2)
proc shape(arr: NDArray): seq[int] {....raises: [], tags: [], forbids: [].}
Gets the dimension sizes of the array.
Returns: Sequence of dimension sizes
let arr = newOnes(@[2, 3, 4]) let dims = arr.shape() # @[2, 3, 4] echo "Shape: ", dims