repl.txt (1150B)
1 2 {{alias}}( x ) 3 Serializes ndarray meta data. 4 5 Meta data format: 6 7 |endianness|dtype|ndims|shape|strides|offset|order|mode|nsubmodes|submodes| 8 9 where 10 11 - endianness: byte order (1 byte) 12 - dtype: data type (2 bytes) 13 - ndims: number of dimensions (8 bytes) 14 - shape: shape (ndims*8 bytes) 15 - strides: strides in units of bytes (ndims*8 bytes) 16 - offset: index offset in units of bytes (8 bytes) 17 - order: array order (1 byte) 18 - mode: index mode (1 byte) 19 - nsubmodes: number of subscript index modes (8 bytes) 20 - submodes: subscript index modes (nsubmodes*1 bytes) 21 22 Serialization is performed according to host byte order (endianness). 23 24 If the endianness is 1, the byte order is little endian. If the endianness 25 is 0, the byte order is big endian. 26 27 Parameters 28 ---------- 29 x: ndarray 30 Input ndarray. 31 32 Returns 33 ------- 34 out: DataView 35 Meta data serialized as a DataView. 36 37 Examples 38 -------- 39 > var arr = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ] ); 40 > var out = {{alias}}( arr ) 41 <DataView> 42 43 See Also 44 -------- 45