Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions lib/node_modules/@stdlib/utils/reduce-right/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,7 @@ var mean = out / ctx.count;
var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );

var v = reduceRight( x, new Complex64( 0.0, 0.0 ), sum );
// returns <Complex64>

var re = realf( v );
// returns 16.0

var im = imagf( v );
// returns 20.0
// returns <Complex64>[ 16.0, 20.0 ]
```

- For [`ndarray`][@stdlib/ndarray/ctor]-like objects, the function performs a reduction over the entire input [`ndarray`][@stdlib/ndarray/ctor] (i.e., higher-order [`ndarray`][@stdlib/ndarray/ctor] dimensions are flattened to a single-dimension).
Expand Down
11 changes: 2 additions & 9 deletions lib/node_modules/@stdlib/utils/reduce-right/lib/ndarray.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@
* @example
* var Complex64Array = require( '@stdlib/array/complex64' );
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
* var realf = require( '@stdlib/complex/float32/real' );
* var imagf = require( '@stdlib/complex/float32/imag' );
* var cadd = require( '@stdlib/complex/float64/base/add' );
* var cadd = require( '@stdlib/complex/float32/base/add' );
* var naryFunction = require( '@stdlib/utils/nary-function' );
*
* // Create a data buffer:
Expand Down Expand Up @@ -89,13 +87,8 @@
* x.ref = x;
*
* // Compute the sum:
* var v = reduceRight( x, new Complex64( 0.0, 0.0 ), naryFunction( cadd, 2 ) );

Check warning on line 90 in lib/node_modules/@stdlib/utils/reduce-right/lib/ndarray.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Unknown word: "cadd"
*
* var re = realf( v );
* // returns 16.0
*
* var im = imagf( v );
* // returns 20.0
* // returns <Complex64>[ 16.0, 20.0 ]
*/
function reduceRight( x, initial, fcn, thisArg ) {
var xbuf;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/utils/reduce-right/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var tape = require( 'tape' );
var noop = require( '@stdlib/utils/noop' );
var naryFunction = require( '@stdlib/utils/nary-function' );
var add = require( '@stdlib/number/float64/base/add' );
var cadd = require( '@stdlib/complex/float64/base/add' );
var cadd = require( '@stdlib/complex/float32/base/add' );
var Float64Array = require( '@stdlib/array/float64' );
var Complex64Array = require( '@stdlib/array/complex64' );
var array = require( '@stdlib/ndarray/array' );
Expand Down