Skip to content

Commit 861f24d

Browse files
committed
Auto-generated commit
1 parent 9bfd7f8 commit 861f24d

10 files changed

Lines changed: 34 additions & 68 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,11 @@ A total of 37 issues were closed in this release:
674674

675675
<details>
676676

677+
- [`697b9ed`](https://github.com/stdlib-js/stdlib/commit/697b9edd6f85e39a03bed4f142814238bb3cdce8) - **docs:** update examples and docs to accommodate data type instances _(by Athan Reines)_
678+
- [`452cc00`](https://github.com/stdlib-js/stdlib/commit/452cc003a69938f9cdce6ed45219f41673af1c1f) - **docs:** update example _(by Athan Reines)_
679+
- [`5e87686`](https://github.com/stdlib-js/stdlib/commit/5e87686d428b0ae5570c1f0c56d4c6721b13643d) - **docs:** update examples to use ndarray instance notation _(by Athan Reines)_
680+
- [`67fe5f8`](https://github.com/stdlib-js/stdlib/commit/67fe5f8d3c4f7c7bbb322e648d48a462960b4b99) - **docs:** update type _(by Athan Reines)_
681+
- [`85d47b6`](https://github.com/stdlib-js/stdlib/commit/85d47b6504ee90577497e26357afa6e63c101df6) - **docs:** update types _(by Athan Reines)_
677682
- [`da7ea70`](https://github.com/stdlib-js/stdlib/commit/da7ea70b7b2de281c4c1364fe7dca3ef8ca7085c) - **refactor:** support data type instances _(by Athan Reines)_
678683
- [`b1623fe`](https://github.com/stdlib-js/stdlib/commit/b1623fe2c183124b2eb55736b4314329aea2856a) - **feat:** update `ndarray/base` TypeScript declarations [(#9420)](https://github.com/stdlib-js/stdlib/pull/9420) _(by stdlib-bot)_
679684
- [`50367fe`](https://github.com/stdlib-js/stdlib/commit/50367fe8a498ac1e3e80fe688eb5c3df2d57a82d) - **feat:** add `toFlippedud` to namespace _(by Athan Reines)_

base/binary-reduce-strided1d-dispatch-factory/README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,7 @@ var ybuf = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];
103103
var y = new ndarray( 'generic', ybuf, [ ybuf.length ], [ 1 ], 0, 'row-major' );
104104

105105
var z = binary( x, y );
106-
// returns <ndarray>
107-
108-
var v = z.get();
109-
// returns -5.0
106+
// returns <ndarray>[ -5.0 ]
110107
```
111108

112109
The function has the following parameters:
@@ -154,7 +151,7 @@ var z = binary( x, y, {
154151
});
155152
// returns <ndarray>
156153

157-
var dt = getDType( z );
154+
var dt = String( getDType( z ) );
158155
// returns 'float64'
159156
```
160157

@@ -191,10 +188,7 @@ var zbuf = [ 0.0 ];
191188
var z = new ndarray( 'generic', zbuf, [], [ 0 ], 0, 'row-major' );
192189

193190
var out = binary.assign( x, y, z );
194-
// returns <ndarray>
195-
196-
var v = out.get();
197-
// returns -5.0
191+
// returns <ndarray>[ -5.0 ]
198192

199193
var bool = ( out === z );
200194
// returns true
@@ -300,7 +294,7 @@ var z = dot( x, y, {
300294
301295
// Resolve the output array data type:
302296
var dt = dtype( z );
303-
console.log( dt );
297+
console.log( String( dt ) );
304298
305299
// Print the results:
306300
console.log( ndarray2array( z ) );

base/binary-reduce-strided1d-dispatch-factory/docs/repl.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
- arrays: array containing two input ndarrays, followed by any
2929
additional ndarray arguments.
3030

31-
idtypes: Array<Array<string>>
31+
idtypes: Array<Array<string|DataType>>
3232
List containing lists of supported input array data types for each input
3333
ndarray argument.
3434

35-
odtypes: Array<string>
35+
odtypes: Array<string|DataType>
3636
List of supported output array data types.
3737

3838
policies: Object
@@ -104,9 +104,8 @@ fcn( x, y[, ...args][, options] )
104104
> var ord = 'row-major';
105105
> var x = new {{alias:@stdlib/ndarray/ctor}}( dt, xbuf, sh, sx, oo, ord );
106106
> var y = new {{alias:@stdlib/ndarray/ctor}}( dt, ybuf, sh, sx, oo, ord );
107-
> var z = f( x, y );
108-
> var v = z.get()
109-
30.0
107+
> var z = f( x, y )
108+
<ndarray>[ 30.0 ]
110109

111110

112111
fcn.assign( x, y[, ...args], out[, options] )
@@ -157,11 +156,9 @@ fcn.assign( x, y[, ...args], out[, options] )
157156
> var y = new {{alias:@stdlib/ndarray/ctor}}( dt, ybuf, sh, sx, oo, ord );
158157
> var out = {{alias:@stdlib/ndarray/zeros}}( [], { 'dtype': dt } );
159158
> var z = f.assign( x, y, out )
160-
<ndarray>
159+
<ndarray>[ 30.0 ]
161160
> var bool = ( out === z )
162161
true
163-
> var v = out.get()
164-
30.0
165162

166163
See Also
167164
--------

base/binary-reduce-strided1d-dispatch-factory/docs/types/index.d.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,7 @@ interface BinaryFunction<T, U> {
152152
* var y = new ndarray( 'generic', ybuf, [ ybuf.length ], [ 1 ], 0, 'row-major' );
153153
*
154154
* var z = dot( x, y );
155-
* // returns <ndarray>
156-
*
157-
* var v = z.get();
158-
* // returns -5.0
155+
* // returns <ndarray>[ -5.0 ]
159156
*/
160157
( x: InputArray<T>, y: InputArray<T>, ...args: Array<InputArray<T> | Options> ): OutputArray<U>; // NOTE: we lose type specificity here, but retaining specificity would likely be difficult and/or tedious to completely enumerate, as the output ndarray data type is dependent on how the input ndarrays interact with output data type policy and whether that policy has been overridden by `options.dtype`. In principle, as well, based on the policy, it is possible to know more exactly which `InputArray` types are actually allowed.
161158

@@ -195,10 +192,7 @@ interface BinaryFunction<T, U> {
195192
* var z = new ndarray( 'generic', zbuf, [], [ 0 ], 0, 'row-major' );
196193
*
197194
* var out = dot.assign( x, y, z );
198-
* // returns <ndarray>
199-
*
200-
* var v = out.get();
201-
* // returns -5.0
195+
* // returns <ndarray>[ -5.0 ]
202196
*
203197
* var bool = ( out === z );
204198
* // returns true
@@ -241,10 +235,7 @@ interface BinaryFunction<T, U> {
241235
* var z = new ndarray( 'generic', zbuf, [], [ 0 ], 0, 'row-major' );
242236
*
243237
* var out = dot.assign( x, y, z );
244-
* // returns <ndarray>
245-
*
246-
* var v = out.get();
247-
* // returns -5.0
238+
* // returns <ndarray>[ -5.0 ]
248239
*
249240
* var bool = ( out === z );
250241
* // returns true
@@ -285,10 +276,7 @@ interface BinaryFunction<T, U> {
285276
* var y = new ndarray( 'generic', ybuf, [ ybuf.length ], [ 1 ], 0, 'row-major' );
286277
*
287278
* var z = dot( x, y );
288-
* // returns <ndarray>
289-
*
290-
* var v = z.get();
291-
* // returns -5.0
279+
* // returns <ndarray>[ -5.0 ]
292280
*/
293281
declare function factory<T = unknown, U = unknown>( table: DispatchTable<T, U> | BaseDispatchTable<T, U>, idtypes: ArrayLike<ArrayLike<DataType>>, odtypes: ArrayLike<DataType>, policies: Policies ): BinaryFunction<T, U>;
294282

base/binary-reduce-strided1d-dispatch-factory/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ var z = dot( x, y, {
7575

7676
// Resolve the output array data type:
7777
var dt = dtype( z );
78-
console.log( dt );
78+
console.log( String( dt ) );
7979

8080
// Print the results:
8181
console.log( ndarray2array( z ) );

base/binary-reduce-strided1d-dispatch-factory/lib/index.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@
4848
* var y = new ndarray( 'generic', ybuf, [ ybuf.length ], [ 1 ], 0, 'row-major' );
4949
*
5050
* var z = dot( x, y );
51-
* // returns <ndarray>
52-
*
53-
* var v = z.get();
54-
* // returns -5.0
51+
* // returns <ndarray>[ -5.0 ]
5552
*
5653
* @example
5754
* var base = require( '@stdlib/blas/base/ndarray/gdot' );
@@ -81,10 +78,7 @@
8178
* var z = new ndarray( 'generic', zbuf, [], [ 0 ], 0, 'row-major' );
8279
*
8380
* var out = dot.assign( x, y, z );
84-
* // returns <ndarray>
85-
*
86-
* var v = out.get();
87-
* // returns -5.0
81+
* // returns <ndarray>[ -5.0 ]
8882
*
8983
* var bool = ( out === z );
9084
* // returns true

base/binary-reduce-strided1d-dispatch-factory/lib/main.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ var BinaryStrided1dDispatch = require( './../../../base/binary-reduce-strided1d-
3131
*
3232
* @param {Object} table - dispatch table
3333
* @param {Function} table.default - default strided reduction function
34-
* @param {StringArray} [table.types] - one-dimensional list of ndarray data types describing specialized input ndarray argument signatures
34+
* @param {ArrayLikeObject} [table.types] - one-dimensional list of ndarray data types describing specialized input ndarray argument signatures
3535
* @param {ArrayLikeObject<Function>} [table.fcns] - list of strided reduction functions which are specific to specialized input ndarray argument signatures
36-
* @param {ArrayLikeObject<StringArray>} idtypes - list containing lists of supported input data types for each ndarray argument
37-
* @param {StringArray} odtypes - list of supported output data types
36+
* @param {ArrayLikeObject<ArrayLikeObject>} idtypes - list containing lists of supported input data types for each ndarray argument
37+
* @param {ArrayLikeObject} odtypes - list of supported output data types
3838
* @param {Object} policies - policies
3939
* @param {string} policies.output - output data type policy
4040
* @param {string} policies.casting - input ndarray casting policy
@@ -69,10 +69,7 @@ var BinaryStrided1dDispatch = require( './../../../base/binary-reduce-strided1d-
6969
* var y = new ndarray( 'generic', ybuf, [ ybuf.length ], [ 1 ], 0, 'row-major' );
7070
*
7171
* var z = dot( x, y );
72-
* // returns <ndarray>
73-
*
74-
* var v = z.get();
75-
* // returns -5.0
72+
* // returns <ndarray>[ -5.0 ]
7673
*
7774
* @example
7875
* var base = require( '@stdlib/blas/base/ndarray/gdot' );
@@ -101,10 +98,7 @@ var BinaryStrided1dDispatch = require( './../../../base/binary-reduce-strided1d-
10198
* var z = new ndarray( 'generic', zbuf, [], [ 0 ], 0, 'row-major' );
10299
*
103100
* var out = dot.assign( x, y, z );
104-
* // returns <ndarray>
105-
*
106-
* var v = out.get();
107-
* // returns -5.0
101+
* // returns <ndarray>[ -5.0 ]
108102
*
109103
* var bool = ( out === z );
110104
* // returns true

base/binary-reduce-strided1d-dispatch/README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,7 @@ var ybuf = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];
9999
var y = new ndarray( 'generic', ybuf, [ ybuf.length ], [ 1 ], 0, 'row-major' );
100100

101101
var z = binary.apply( x, y );
102-
// returns <ndarray>
103-
104-
var v = z.get();
105-
// returns -5.0
102+
// returns <ndarray>[ -5.0 ]
106103
```
107104

108105
The method has the following parameters:
@@ -148,7 +145,7 @@ var z = binary.apply( x, y, {
148145
});
149146
// returns <ndarray>
150147

151-
var dt = getDType( z );
148+
var dt = String( getDType( z ) );
152149
// returns 'float64'
153150
```
154151

@@ -183,10 +180,7 @@ var zbuf = [ 0.0 ];
183180
var z = new ndarray( 'generic', zbuf, [], [ 0 ], 0, 'row-major' );
184181

185182
var out = binary.assign( x, y, z );
186-
// returns <ndarray>
187-
188-
var v = out.get();
189-
// returns -5.0
183+
// returns <ndarray>[ -5.0 ]
190184

191185
var bool = ( out === z );
192186
// returns true
@@ -290,7 +284,7 @@ var z = dot.apply( x, y, {
290284
291285
// Resolve the output array data type:
292286
var dt = dtype( z );
293-
console.log( dt );
287+
console.log( String( dt ) );
294288
295289
// Print the results:
296290
console.log( ndarray2array( z ) );

base/binary-reduce-strided1d-dispatch/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ var z = dot.apply( x, y, {
7575

7676
// Resolve the output array data type:
7777
var dt = dtype( z );
78-
console.log( dt );
78+
console.log( String( dt ) );
7979

8080
// Print the results:
8181
console.log( ndarray2array( z ) );

base/binary-reduce-strided1d-dispatch/lib/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ var DEFAULT_ORDER = defaults.get( 'order' );
7777
* @constructor
7878
* @param {Object} table - dispatch table
7979
* @param {Function} table.default - default strided reduction function
80-
* @param {Array} [table.types=[]] - one-dimensional list of ndarray data types describing specialized input ndarray argument signatures
80+
* @param {ArrayLikeObject} [table.types=[]] - one-dimensional list of ndarray data types describing specialized input ndarray argument signatures
8181
* @param {ArrayLikeObject<Function>} [table.fcns=[]] - list of strided reduction functions which are specific to specialized input ndarray argument signatures
82-
* @param {ArrayLikeObject<Array>} idtypes - list containing lists of supported input data types for each input ndarray argument
83-
* @param {Array} odtypes - list of supported output data types
82+
* @param {ArrayLikeObject<ArrayLikeObject>} idtypes - list containing lists of supported input data types for each input ndarray argument
83+
* @param {ArrayLikeObject} odtypes - list of supported output data types
8484
* @param {Object} policies - policies
8585
* @param {string} policies.output - output data type policy
8686
* @param {string} policies.casting - input ndarray casting policy

0 commit comments

Comments
 (0)