ndArray ¶
ndArrays represent an nth dimensional array that you can perform vectorised operations on.
properties¶
Buffer : {T}
A flat table containing the array's values.
ndim : number
The dimension number of the array.
Shape : {number}
The table that defines the dimensions of the array.
Strides : {number}
The table that defines how indices get converted into a flat index.
Offset : number
The offset where the first index begins.
type : "ndArray"
The type of the object, this being "ndArray"
dtype : string
The datatype of the values the array is holding.
methods¶
copy -> () ¶
creates a new copy of the original ndArray.
view -> () ¶
creates a new view of the original ndArray.
reshape -> () ¶
creates a new view of the original ndArray using the arguments provided for the shape.
flatten -> () ¶
creates a new view of the original ndArray as a flat array.
eye -> () ¶
returns the identity matrix of the ndArray.
transpose -> () ¶
creates a new view of the original ndArray which is transposed.
item -> () ¶
gets the value from the ndArray using the indices provided. 0d ndArrays will just return the value they're holding.
toflatlist -> () ¶
returns a flat table of elements from the ndArray, with respect to its shape, stride and offset.
swap -> () ¶
does a implace swap across an axis between the values at index1 and index2