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
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/blas/ext/linspace/README.md
+6-30Lines changed: 6 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,13 +35,9 @@ var linspace = require( '@stdlib/blas/ext/linspace' );
35
35
Returns a new [ndarray][@stdlib/ndarray/ctor] filled with linearly spaced values over a specified interval along one or more [ndarray][@stdlib/ndarray/ctor] dimensions.
36
36
37
37
```javascript
38
-
var ndarray2array =require( '@stdlib/ndarray/to-array' );
39
38
40
39
var x =linspace( [ 4 ], 1.0, 4.0 );
41
-
// returns <ndarray>
42
-
43
-
var arr =ndarray2array( x );
44
-
// returns [ 1.0, 2.0, 3.0, 4.0 ]
40
+
// returns <ndarray>[ 1.0, 2.0, 3.0, 4.0 ]
45
41
```
46
42
47
43
The function has the following parameters:
@@ -63,77 +59,57 @@ The function accepts the following options:
63
59
By default, the function always includes the end of the interval in the list of values written to an output [ndarray][@stdlib/ndarray/ctor]. To exclude the end of the interval, provide an `endpoint` argument.
64
60
65
61
```javascript
66
-
var ndarray2array =require( '@stdlib/ndarray/to-array' );
67
62
68
63
var x =linspace( [ 4 ], 1.0, 5.0, false );
69
-
// returns <ndarray>
70
-
71
-
var arr =ndarray2array( x );
72
-
// returns [ 1.0, 2.0, 3.0, 4.0 ]
64
+
// returns <ndarray>[ 1.0, 2.0, 3.0, 4.0 ]
73
65
```
74
66
75
67
When provided scalar or zero-dimensional [ndarray][@stdlib/ndarray/ctor]`start`, `stop`, and `endpoint` arguments, the values are broadcast across all elements in the shape defined by the complement of those dimensions specified by `options.dims`. To specify separate sub-array configurations, provide non-zero-dimensional [ndarray][@stdlib/ndarray/ctor] arguments.
76
68
77
69
```javascript
78
70
var array =require( '@stdlib/ndarray/array' );
79
71
var BooleanArray =require( '@stdlib/array/bool' );
80
-
var ndarray2array =require( '@stdlib/ndarray/to-array' );
81
72
82
73
var start =array( [ 1.0, 5.0 ] );
83
74
var end =array( [ 3.0, 8.0 ] );
84
75
var endpoint =array( newBooleanArray( [ true, false ] ) );
85
76
86
77
var x =linspace( [ 2, 3 ], start, end, endpoint );
By default, the function generates linearly spaced values along the last dimension of an output [ndarray][@stdlib/ndarray/ctor]. To perform the operation over specific dimensions, provide a `dims` option.
94
82
95
83
```javascript
96
-
var ndarray2array =require( '@stdlib/ndarray/to-array' );
Fills an [ndarray][@stdlib/ndarray/ctor] with linearly spaced values over a specified interval along one or more [ndarray][@stdlib/ndarray/ctor] dimensions.
124
104
125
105
```javascript
126
-
var ndarray2array =require( '@stdlib/ndarray/to-array' );
<TextendsRealStart=RealStart,UextendsRealStop=RealStop>(shape: number|ArrayLike<number>,start: T,stop: U,options: OptionsWithDataType): OutputArray;// TODO: we lose some type specificity here. We could likely improve specificity here by using type maps
142
138
@@ -150,13 +146,9 @@ interface Linspace {
150
146
* @returns output ndarray
151
147
*
152
148
* @example
153
-
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
<TextendsRealStart=RealStart,UextendsRealStop=RealStop>(shape: number|ArrayLike<number>,start: T,stop: U,options: Options): RealOutputArray;// NOTE: we lose some type specificity here, as the output ndarray data type is determined according to type promotion rules
162
154
@@ -171,15 +163,11 @@ interface Linspace {
171
163
* @returns output ndarray
172
164
*
173
165
* @example
174
-
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
<TextendsRealStart=RealStart,UextendsRealStop=RealStop,VextendsEndpoint=Endpoint>(shape: number|ArrayLike<number>,start: T,stop: U,endpoint: V,options: OptionsWithDataType): OutputArray;// TODO: we lose some type specificity here. We could likely improve specificity here by using type maps
185
173
@@ -194,13 +182,9 @@ interface Linspace {
194
182
* @returns output ndarray
195
183
*
196
184
* @example
197
-
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
<TextendsRealStart=RealStart,UextendsRealStop=RealStop,VextendsEndpoint=Endpoint>(shape: number|ArrayLike<number>,start: T,stop: U,endpoint?: V,options?: Options): RealOutputArray;// NOTE: we lose some type specificity here, as the output ndarray data type is determined according to type promotion rules
206
190
@@ -214,15 +198,11 @@ interface Linspace {
214
198
* @returns output ndarray
215
199
*
216
200
* @example
217
-
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
<TextendsStart=Start,UextendsStop=Stop>(shape: number|ArrayLike<number>,start: T,stop: U,options: OptionsWithDataType): ComplexOutputArray;// TODO: we lose some type specificity here. We could likely improve specificity here by using type maps
228
208
@@ -236,13 +216,9 @@ interface Linspace {
236
216
* @returns output ndarray
237
217
*
238
218
* @example
239
-
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
<TextendsStart=Start,UextendsStop=Stop>(shape: number|ArrayLike<number>,start: T,stop: U,options: Options): ComplexOutputArray;/* eslint-disable-line @typescript-eslint/unified-signatures */// NOTE: we lose some type specificity here, as the output ndarray data type is determined according to type promotion rules
248
224
@@ -257,15 +233,11 @@ interface Linspace {
257
233
* @returns output ndarray
258
234
*
259
235
* @example
260
-
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
<TextendsStart=Start,UextendsStop=Stop,VextendsEndpoint=Endpoint>(shape: number|ArrayLike<number>,start: T,stop: U,endpoint: V,options: OptionsWithDataType): ComplexOutputArray;// TODO: we lose some type specificity here. We could likely improve specificity here by using type maps
271
243
@@ -280,13 +252,9 @@ interface Linspace {
280
252
* @returns output ndarray
281
253
*
282
254
* @example
283
-
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
<TextendsStart=Start,UextendsStop=Stop,VextendsEndpoint=Endpoint>(shape: number|ArrayLike<number>,start: T,stop: U,endpoint?: V,options?: Options): ComplexOutputArray;// NOTE: we lose some type specificity here, as the output ndarray data type is determined according to type promotion rules
292
260
@@ -301,19 +269,15 @@ interface Linspace {
301
269
*
302
270
* @example
303
271
* var zeros = require( '@stdlib/ndarray/zeros' );
304
-
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
0 commit comments