Skip to content

Commit 89a62f9

Browse files
committed
chore: clean-up
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: skipped - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent 21f8b4a commit 89a62f9

File tree

11 files changed

+198
-200
lines changed

11 files changed

+198
-200
lines changed

lib/node_modules/@stdlib/ndarray/base/binary-reduce-strided1d-dispatch/README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ limitations under the License.
2222

2323
# BinaryStrided1dDispatch
2424

25-
> Constructor for performing a binary reduction on two input ndarrays.
25+
> Constructor for performing a reduction on two input ndarrays.
2626
2727
<section class="usage">
2828

@@ -34,7 +34,7 @@ var BinaryStrided1dDispatch = require( '@stdlib/ndarray/base/binary-reduce-strid
3434

3535
#### BinaryStrided1dDispatch( table, idtypes, odtypes, policies )
3636

37-
Constructor for performing a binary reduction on two input ndarrays.
37+
Constructor for performing a reduction on two input ndarrays.
3838

3939
```javascript
4040
var base = require( '@stdlib/blas/base/ndarray/gdot' );
@@ -45,23 +45,23 @@ var table = {
4545

4646
var dtypes = [ 'float64', 'float32', 'generic' ];
4747
var policies = {
48-
'output': 'same',
49-
'casting': 'none'
48+
'output': 'promoted',
49+
'casting': 'promoted'
5050
};
5151

5252
var binary = new BinaryStrided1dDispatch( table, [ dtypes, dtypes ], dtypes, policies );
5353
```
5454

5555
The constructor has the following parameters:
5656

57-
- **table**: strided binary reduction function dispatch table. Must have the following properties:
57+
- **table**: strided reduction function dispatch table. Must have the following properties:
5858

59-
- **default**: default strided binary reduction function which should be invoked when provided ndarrays have data types which do not have a corresponding specialized implementation.
59+
- **default**: default strided reduction function which should be invoked when provided ndarrays have data types which do not have a corresponding specialized implementation.
6060

6161
A dispatch table may have the following additional properties:
6262

63-
- **types**: one-dimensional list of ndarray data types describing specialized input ndarray argument signatures. Only the input ndarray argument data types should be specified. Output ndarray and additional input ndarray argument data types should be omitted and are not considered during dispatch. The length of `types` must equal twice the number of strided functions specified by `fcns` (i.e., for every pair of input ndarray data types, there must be a corresponding strided binary reduction function in `fcns`).
64-
- **fcns**: list of strided binary reduction functions which are specific to specialized input ndarray argument signatures.
63+
- **types**: one-dimensional list of ndarray data types describing specialized input ndarray argument signatures. Only the input ndarray argument data types should be specified. Output ndarray and additional input ndarray argument data types should be omitted and are not considered during dispatch. The length of `types` must be twice the number of strided functions specified by `fcns` (i.e., for every pair of input ndarray data types, there must be a corresponding strided reduction function in `fcns`).
64+
- **fcns**: list of strided reduction functions which are specific to specialized input ndarray argument signatures.
6565

6666
- **idtypes**: list containing lists of supported input data types for each input ndarray argument.
6767

@@ -74,7 +74,7 @@ The constructor has the following parameters:
7474

7575
#### BinaryStrided1dDispatch.prototype.apply( x, y\[, ...args]\[, options] )
7676

77-
Performs a binary reduction on two provided input ndarrays.
77+
Performs a reduction on two provided input ndarrays.
7878

7979
```javascript
8080
var ndarray = require( '@stdlib/ndarray/base/ctor' );
@@ -86,8 +86,8 @@ var table = {
8686

8787
var dtypes = [ 'float64', 'float32', 'generic' ];
8888
var policies = {
89-
'output': 'same',
90-
'casting': 'none'
89+
'output': 'promoted',
90+
'casting': 'promoted'
9191
};
9292

9393
var binary = new BinaryStrided1dDispatch( table, [ dtypes, dtypes ], dtypes, policies );
@@ -114,7 +114,7 @@ The method has the following parameters:
114114

115115
The method accepts the following options:
116116

117-
- **dims**: list of dimensions over which to perform a binary reduction.
117+
- **dims**: list of dimensions over which to perform a reduction.
118118
- **dtype**: output ndarray data type. Setting this option, overrides the output data type policy.
119119
- **keepdims**: boolean indicating whether the reduced dimensions should be included in the returned ndarray as singleton dimensions. Default: `false`.
120120

@@ -131,8 +131,8 @@ var table = {
131131

132132
var dtypes = [ 'float64', 'float32', 'generic' ];
133133
var policies = {
134-
'output': 'same',
135-
'casting': 'none'
134+
'output': 'promoted',
135+
'casting': 'promoted'
136136
};
137137

138138
var binary = new BinaryStrided1dDispatch( table, [ dtypes, dtypes ], dtypes, policies );
@@ -154,7 +154,7 @@ var dt = getDType( z );
154154

155155
#### BinaryStrided1dDispatch.prototype.assign( x, y\[, ...args], out\[, options] )
156156

157-
Performs a binary reduction on two provided input ndarrays and assigns results to a provided output ndarray.
157+
Performs a reduction on two provided input ndarrays and assigns results to a provided output ndarray.
158158

159159
```javascript
160160
var base = require( '@stdlib/blas/base/ndarray/gdot' );
@@ -164,8 +164,8 @@ var ndarray = require( '@stdlib/ndarray/base/ctor' );
164164
var idt = dtypes( 'real_and_generic' );
165165
var odt = idt;
166166
var policies = {
167-
'output': 'same',
168-
'casting': 'none'
167+
'output': 'promoted',
168+
'casting': 'promoted'
169169
};
170170

171171
var table = {
@@ -202,7 +202,7 @@ The method has the following parameters:
202202

203203
The method accepts the following options:
204204

205-
- **dims**: list of dimensions over which to perform a binary reduction.
205+
- **dims**: list of dimensions over which to perform a reduction.
206206

207207
</section>
208208

@@ -212,7 +212,7 @@ The method accepts the following options:
212212

213213
## Notes
214214

215-
- A strided binary reduction function should have the following signature:
215+
- A strided reduction function should have the following signature:
216216

217217
```text
218218
f( arrays )
@@ -251,15 +251,15 @@ var odt = dtypes( 'real_and_generic' );
251251
252252
// Define dispatch policies:
253253
var policies = {
254-
'output': 'same',
255-
'casting': 'none'
254+
'output': 'promoted',
255+
'casting': 'promoted'
256256
};
257257
258258
// Define a dispatch table:
259259
var table = {
260260
'types': [
261-
'float64', 'float64', // first and second input
262-
'float32', 'float32' // first and second input
261+
'float64', 'float64', // input data types
262+
'float32', 'float32' // input data types
263263
],
264264
'fcns': [
265265
ddot,
@@ -268,7 +268,7 @@ var table = {
268268
'default': base
269269
};
270270
271-
// Create an interface for performing a binary reduction:
271+
// Create an interface for performing a reduction:
272272
var dot = new BinaryStrided1dDispatch( table, [ idt, idt ], odt, policies );
273273
274274
// Generate arrays of random numbers:
@@ -283,7 +283,7 @@ var ybuf = uniform( 100, -1.0, 1.0, {
283283
var x = new ndarray( 'generic', xbuf, [ 10, 10 ], [ 10, 1 ], 0, 'row-major' );
284284
var y = new ndarray( 'generic', ybuf, [ 10, 10 ], [ 10, 1 ], 0, 'row-major' );
285285
286-
// Perform a binary reduction:
286+
// Perform a reduction:
287287
var z = dot.apply( x, y, {
288288
'dims': [ 0 ]
289289
});

lib/node_modules/@stdlib/ndarray/base/binary-reduce-strided1d-dispatch/benchmark/benchmark.apply.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ function createBenchmark( len ) {
5353
};
5454
dt = dtypes( 'real_floating_point' );
5555
policies = {
56-
'output': 'same',
57-
'casting': 'none'
56+
'output': 'promoted',
57+
'casting': 'promoted'
5858
};
5959
binary = new BinaryStrided1dDispatch( table, [ dt, dt ], dt, policies );
6060

lib/node_modules/@stdlib/ndarray/base/binary-reduce-strided1d-dispatch/benchmark/benchmark.assign.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ function createBenchmark( len ) {
5555
};
5656
dt = dtypes( 'real_floating_point' );
5757
policies = {
58-
'output': 'same',
59-
'casting': 'none'
58+
'output': 'promoted',
59+
'casting': 'promoted'
6060
};
6161
binary = new BinaryStrided1dDispatch( table, [ dt, dt ], dt, policies );
6262

lib/node_modules/@stdlib/ndarray/base/binary-reduce-strided1d-dispatch/benchmark/benchmark.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ bench( pkg+'::new', function benchmark( b ) {
4343
'float32'
4444
];
4545
policies = {
46-
'output': 'same',
47-
'casting': 'none'
46+
'output': 'promoted',
47+
'casting': 'promoted'
4848
};
4949

5050
b.tic();
@@ -78,8 +78,8 @@ bench( pkg+'::no_new', function benchmark( b ) {
7878
'float32'
7979
];
8080
policies = {
81-
'output': 'same',
82-
'casting': 'none'
81+
'output': 'promoted',
82+
'casting': 'promoted'
8383
};
8484

8585
fcn = BinaryStrided1dDispatch;

lib/node_modules/@stdlib/ndarray/base/binary-reduce-strided1d-dispatch/docs/repl.txt

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11

22
{{alias}}( table, idtypes, odtypes, policies )
3-
Returns an ndarray function interface for performing a binary reduction on
4-
two input ndarrays.
3+
Returns an ndarray function interface for performing a reduction on two
4+
input ndarrays.
55

66
Parameters
77
----------
88
table: Object
9-
Dispatch table containing strided binary reduction functions. The table
10-
object must have the following property:
9+
Dispatch table containing strided reduction functions. The table object
10+
must have the following property:
1111

12-
- default: default strided binary reduction function to invoke when
13-
provided ndarrays have data types which do not have a corresponding
14-
specialized implementation.
12+
- default: default strided reduction function to invoke when provided
13+
ndarrays have data types which do not have a corresponding specialized
14+
implementation.
1515

1616
The table may having the following additional properties:
1717

1818
- types: one-dimensional list of ndarray data types describing
1919
specialized input ndarray argument signatures.
20-
- fcns: list of strided binary reduction functions which are specific
21-
to specialized input ndarray argument signatures.
20+
- fcns: list of strided reduction functions which are specific to
21+
specialized input ndarray argument signatures.
2222

23-
A strided binary reduction function should have the following signature:
23+
A strided reduction function should have the following signature:
2424

2525
f( arrays )
2626

@@ -45,18 +45,18 @@
4545
Returns
4646
-------
4747
out: Object
48-
Instance having methods for performing a binary reduction.
48+
Instance having methods for performing a reduction.
4949

5050
Examples
5151
--------
5252
> var dts = [ 'float64', 'float32', 'generic' ];
53-
> var p = { 'output': 'same', 'casting': 'none' };
53+
> var p = { 'output': 'promoted', 'casting': 'promoted' };
5454
> var t = { 'default': {{alias:@stdlib/blas/base/ndarray/gdot}} };
5555
> var out = new {{alias}}( t, [ dts, dts ], dts, p );
5656

5757

5858
{{alias}}.prototype.apply( x, y[, ...args][, options] )
59-
Performs a binary reduction on two provided input ndarrays.
59+
Performs a reduction on two provided input ndarrays.
6060

6161
Parameters
6262
----------
@@ -77,9 +77,9 @@
7777
type policy.
7878

7979
options.dims: Array<integer> (optional)
80-
List of dimensions over which to perform a binary reduction. If not
81-
provided, the function performs a binary reduction over all elements in
82-
the two provided input ndarrays.
80+
List of dimensions over which to perform a reduction. If not provided,
81+
the function performs a reduction over all elements in the input
82+
ndarrays.
8383

8484
options.keepdims: boolean (optional)
8585
Boolean indicating whether the reduced dimensions should be included in
@@ -93,7 +93,7 @@
9393
Examples
9494
--------
9595
> var dts = [ 'float64', 'float32', 'generic' ];
96-
> var p = { 'output': 'same', 'casting': 'none' };
96+
> var p = { 'output': 'promoted', 'casting': 'promoted' };
9797
> var t = { 'default': {{alias:@stdlib/blas/base/ndarray/gdot}} };
9898
> var f = new {{alias}}( t, [ dts, dts ], dts, p );
9999
> var xbuf = [ -1.0, 2.0, -3.0, -4.0 ];
@@ -111,8 +111,8 @@
111111

112112

113113
{{alias}}.prototype.assign( x, y[, ...args], out[, options] )
114-
Performs a binary reduction on two provided input ndarrays and assigns
115-
results to a provided output ndarray.
114+
Performs a reduction on two provided input ndarrays and assigns results to a
115+
provided output ndarray.
116116

117117
Parameters
118118
----------
@@ -132,9 +132,9 @@
132132
Function options.
133133

134134
options.dims: Array<integer> (optional)
135-
List of dimensions over which to perform a binary reduction. If not
136-
provided, the function performs a binary reduction over all elements
137-
in the two provided input ndarrays.
135+
List of dimensions over which to perform a reduction. If not provided,
136+
the function performs a reduction over all elements in the input
137+
ndarrays.
138138

139139
Returns
140140
-------
@@ -144,9 +144,9 @@
144144
Examples
145145
--------
146146
> var dts = [ 'float64', 'float32', 'generic' ];
147-
> var p = { 'output': 'same', 'casting': 'none' };
147+
> var p = { 'output': 'promoted', 'casting': 'promoted' };
148148
> var t = { 'default': {{alias:@stdlib/blas/base/ndarray/gdot}} };
149-
> var f = new {{alias}}( t, [ dts, dts ], dts, 'same' );
149+
> var f = new {{alias}}( t, [ dts, dts ], dts, p );
150150
> var xbuf = [ -1.0, 2.0, -3.0, -4.0 ];
151151
> var ybuf = [ -1.0, 2.0, -3.0, -4.0 ];
152152
> var dt = 'generic';

0 commit comments

Comments
 (0)