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-34Lines changed: 6 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,13 +35,8 @@ 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
-
40
38
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 ]
39
+
// returns <ndarray>[ 1.0, 2.0, 3.0, 4.0 ]
45
40
```
46
41
47
42
The function has the following parameters:
@@ -63,77 +58,54 @@ The function accepts the following options:
63
58
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
59
65
60
```javascript
66
-
var ndarray2array =require( '@stdlib/ndarray/to-array' );
67
-
68
61
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 ]
62
+
// returns <ndarray>[ 1.0, 2.0, 3.0, 4.0 ]
73
63
```
74
64
75
65
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
66
77
67
```javascript
78
68
var array =require( '@stdlib/ndarray/array' );
79
69
var BooleanArray =require( '@stdlib/array/bool' );
80
-
var ndarray2array =require( '@stdlib/ndarray/to-array' );
81
70
82
71
var start =array( [ 1.0, 5.0 ] );
83
72
var end =array( [ 3.0, 8.0 ] );
84
73
var endpoint =array( newBooleanArray( [ true, false ] ) );
85
74
86
75
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
80
95
81
```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
100
125
101
```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
137
@@ -150,13 +145,8 @@ interface Linspace {
150
145
* @returns output ndarray
151
146
*
152
147
* @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
152
@@ -171,15 +161,10 @@ interface Linspace {
171
161
* @returns output ndarray
172
162
*
173
163
* @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
170
@@ -194,13 +179,8 @@ interface Linspace {
194
179
* @returns output ndarray
195
180
*
196
181
* @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
186
@@ -214,15 +194,10 @@ interface Linspace {
214
194
* @returns output ndarray
215
195
*
216
196
* @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
203
@@ -236,13 +211,8 @@ interface Linspace {
236
211
* @returns output ndarray
237
212
*
238
213
* @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
218
@@ -257,15 +227,10 @@ interface Linspace {
257
227
* @returns output ndarray
258
228
*
259
229
* @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
236
@@ -280,13 +245,8 @@ interface Linspace {
280
245
* @returns output ndarray
281
246
*
282
247
* @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
252
@@ -301,19 +261,15 @@ interface Linspace {
301
261
*
302
262
* @example
303
263
* var zeros = require( '@stdlib/ndarray/zeros' );
304
-
* var ndarray2array = require( '@stdlib/ndarray/to-array' );
0 commit comments