Skip to content

Commit 0cdfb29

Browse files
committed
Update example
1 parent 3dd6115 commit 0cdfb29

File tree

1 file changed

+2
-5
lines changed
  • lib/node_modules/@stdlib/ndarray/base/unary/examples

1 file changed

+2
-5
lines changed

lib/node_modules/@stdlib/ndarray/base/unary/examples/index.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,11 @@
2121
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
2222
var filledarray = require( '@stdlib/array/filled' );
2323
var filledarrayBy = require( '@stdlib/array/filled-by' );
24+
var abs = require( '@stdlib/math/base/special/abs' );
2425
var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
2526
var ndarray2array = require( '@stdlib/ndarray/base/to-array' );
2627
var unary = require( './../lib' );
2728

28-
function scale( x ) {
29-
return x * 10;
30-
}
31-
3229
var N = 10;
3330
var x = {
3431
'dtype': 'generic',
@@ -47,6 +44,6 @@ var y = {
4744
'order': 'column-major'
4845
};
4946

50-
unary( [ x, y ], scale );
47+
unary( [ x, y ], abs );
5148
console.log( ndarray2array( x.data, x.shape, x.strides, x.offset, x.order ) );
5249
console.log( ndarray2array( y.data, y.shape, y.strides, y.offset, y.order ) );

0 commit comments

Comments
 (0)