You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**order**: specifies whether an [ndarray][@stdlib/ndarray/ctor] is `'row-major'` (C-style) or `'column-major'` (Fortran-style). Default: `'row-major'`.
75
-
-**mode**: specifies how to handle indices which exceed array dimensions (see [`ndarray`][@stdlib/ndarray/ctor]). Default: `'throw'`.
76
-
-**submode**: a mode array which specifies for each dimension how to handle subscripts which exceed array dimensions (see [`ndarray`][@stdlib/ndarray/ctor]). If provided fewer modes than dimensions, the constructor recycles modes using modulo arithmetic. Default: `[ options.mode ]`.
81
+
-**mode**: specifies how to handle indices which exceed array dimensions (see [ndarray][@stdlib/ndarray/ctor]). Default: `'throw'`.
82
+
-**submode**: a mode array which specifies for each dimension how to handle subscripts which exceed array dimensions (see [ndarray][@stdlib/ndarray/ctor]). If provided fewer modes than dimensions, the constructor recycles modes using modulo arithmetic. Default: `[ options.mode ]`.
77
83
78
84
By default, the function returns an [ndarray][@stdlib/ndarray/ctor] having a [`float64`][@stdlib/ndarray/dtypes] data type. To specify an alternative [data type][@stdlib/ndarray/dtypes], provide a `dtype` option.
79
85
80
86
```javascript
87
+
var getShape =require( '@stdlib/ndarray/shape' );
88
+
var getDType =require( '@stdlib/ndarray/dtype' );
89
+
81
90
var arr =empty( [ 2, 2 ], {
82
91
'dtype':'float32'
83
92
});
84
93
// returns <ndarray>
85
94
86
-
var sh =arr.shape;
95
+
var sh =getShape( arr );
87
96
// returns [ 2, 2 ]
88
97
89
-
var dt =arr.dtype;
98
+
var dt =String( getDType( arr ) );
90
99
// returns 'float32'
91
100
```
92
101
@@ -117,10 +126,11 @@ var dt = arr.dtype;
117
126
118
127
```javascript
119
128
var dtypes =require( '@stdlib/ndarray/dtypes' );
129
+
var ndarray2array =require( '@stdlib/ndarray/to-array' );
120
130
var empty =require( '@stdlib/ndarray/empty' );
121
131
122
132
// Get a list of data types:
123
-
var dt =dtypes();
133
+
var dt =dtypes('integer_and_generic');
124
134
125
135
// Generate uninitialized arrays...
126
136
var arr;
@@ -129,7 +139,7 @@ for ( i = 0; i < dt.length; i++ ) {
0 commit comments