diff --git a/lib/node_modules/@stdlib/ndarray/filter/README.md b/lib/node_modules/@stdlib/ndarray/filter/README.md index f107e329148a..6c75d607a30c 100644 --- a/lib/node_modules/@stdlib/ndarray/filter/README.md +++ b/lib/node_modules/@stdlib/ndarray/filter/README.md @@ -45,7 +45,6 @@ Returns a shallow copy of an [ndarray][@stdlib/ndarray/ctor] containing only tho ```javascript var Float64Array = require( '@stdlib/array/float64' ); var ndarray = require( '@stdlib/ndarray/ctor' ); -var ndarray2array = require( '@stdlib/ndarray/to-array' ); function predicate( z ) { return z > 6.0; @@ -60,10 +59,7 @@ var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); // returns var y = filter( x, predicate ); -// returns - -var arr = ndarray2array( y ); -// returns [ 8.0, 9.0, 10.0 ] +// returns [ 8.0, 9.0, 10.0 ] ``` The function accepts the following arguments: @@ -86,7 +82,6 @@ By default, the output ndarray [data type][@stdlib/ndarray/dtypes] is inferred f var Float64Array = require( '@stdlib/array/float64' ); var ndarray = require( '@stdlib/ndarray/ctor' ); var dtype = require( '@stdlib/ndarray/dtype' ); -var ndarray2array = require( '@stdlib/ndarray/to-array' ); function predicate( z ) { return z > 6.0; @@ -104,13 +99,10 @@ var opts = { 'dtype': 'float32' }; var y = filter( x, opts, predicate ); -// returns +// returns [ 8.0, 9.0, 10.0 ] var dt = dtype( y ); // returns 'float32' - -var arr = ndarray2array( y ); -// returns [ 8.0, 9.0, 10.0 ] ``` To set the `predicate` function execution context, provide a `thisArg`. @@ -120,7 +112,6 @@ To set the `predicate` function execution context, provide a `thisArg`. ```javascript var Float64Array = require( '@stdlib/array/float64' ); var ndarray = require( '@stdlib/ndarray/ctor' ); -var ndarray2array = require( '@stdlib/ndarray/to-array' ); function predicate( z ) { this.count += 1; @@ -139,10 +130,7 @@ var ctx = { 'count': 0 }; var y = filter( x, predicate, ctx ); -// returns - -var arr = ndarray2array( y ); -// returns [ 8.0, 9.0, 10.0 ] +// returns [ 8.0, 9.0, 10.0 ] var count = ctx.count; // returns 6 diff --git a/lib/node_modules/@stdlib/ndarray/filter/docs/repl.txt b/lib/node_modules/@stdlib/ndarray/filter/docs/repl.txt index 75de7edcc282..7af0b57ea402 100644 --- a/lib/node_modules/@stdlib/ndarray/filter/docs/repl.txt +++ b/lib/node_modules/@stdlib/ndarray/filter/docs/repl.txt @@ -43,9 +43,8 @@ -------- > var x = {{alias:@stdlib/ndarray/array}}( [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ] ); > function f( v ) { return v > 2.0; }; - > var y = {{alias}}( x, f ); - > {{alias:@stdlib/ndarray/to-array}}( y ) - [ 3.0, 4.0 ] + > var y = {{alias}}( x, f ) + [ 3.0, 4.0 ] See Also -------- diff --git a/lib/node_modules/@stdlib/ndarray/filter/docs/types/index.d.ts b/lib/node_modules/@stdlib/ndarray/filter/docs/types/index.d.ts index bc510911470e..4ff53b3ecd7c 100644 --- a/lib/node_modules/@stdlib/ndarray/filter/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/ndarray/filter/docs/types/index.d.ts @@ -305,7 +305,6 @@ interface GenericOptions extends Options { * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -316,10 +315,7 @@ interface GenericOptions extends Options { * // returns * * var y = filter( x, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2.0, 4.0, 8.0, 10.0 ] +* // returns [ 2.0, 4.0, 8.0, 10.0 ] */ declare function filter( x: float64ndarray, predicate: Predicate, thisArg?: ThisParameterType> ): float64ndarray; @@ -335,7 +331,6 @@ declare function filter( x: float64ndarray, predicate: Predicate( x: float64ndarray, predicate: Predicate * * var y = filter( x, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2.0, 4.0, 8.0, 10.0 ] +* // returns [ 2.0, 4.0, 8.0, 10.0 ] */ declare function filter( x: float32ndarray, predicate: Predicate, thisArg?: ThisParameterType> ): float32ndarray; @@ -423,7 +415,6 @@ declare function filter( x: complex128ndarray, predicate: Predicate * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Int32Array = require( '@stdlib/array/int32' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Int32Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); * var shape = [ 2, 3 ]; @@ -434,10 +425,7 @@ declare function filter( x: complex128ndarray, predicate: Predicate * // returns * * var y = filter( x, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: int32ndarray, predicate: Predicate, thisArg?: ThisParameterType> ): int32ndarray; @@ -453,7 +441,6 @@ declare function filter( x: int32ndarray, predicate: Predicate( x: int32ndarray, predicate: Predicate * * var y = filter( x, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: int16ndarray, predicate: Predicate, thisArg?: ThisParameterType> ): int16ndarray; @@ -483,7 +467,6 @@ declare function filter( x: int16ndarray, predicate: Predicate( x: int16ndarray, predicate: Predicate * * var y = filter( x, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: int8ndarray, predicate: Predicate, thisArg?: ThisParameterType> ): int8ndarray; @@ -513,7 +493,6 @@ declare function filter( x: int8ndarray, predicate: Predicate( x: int8ndarray, predicate: Predicate * * var y = filter( x, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: uint32ndarray, predicate: Predicate, thisArg?: ThisParameterType> ): uint32ndarray; @@ -543,7 +519,6 @@ declare function filter( x: uint32ndarray, predicate: Predicate( x: uint32ndarray, predicate: Predicate * * var y = filter( x, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: uint16ndarray, predicate: Predicate, thisArg?: ThisParameterType> ): uint16ndarray; @@ -573,7 +545,6 @@ declare function filter( x: uint16ndarray, predicate: Predicate( x: uint16ndarray, predicate: Predicate * * var y = filter( x, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: uint8ndarray, predicate: Predicate, thisArg?: ThisParameterType> ): uint8ndarray; @@ -603,7 +571,6 @@ declare function filter( x: uint8ndarray, predicate: Predicate( x: uint8ndarray, predicate: Predicate * * var y = filter( x, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: uint8cndarray, predicate: Predicate, thisArg?: ThisParameterType> ): uint8cndarray; @@ -632,7 +596,6 @@ declare function filter( x: uint8cndarray, predicate: Predicate( x: uint8cndarray, predicate: Predicate * * var y = filter( x, predicate ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ true, true, true, true ] +* // returns [ true, true, true, true ] */ declare function filter( x: boolndarray, predicate: Predicate, thisArg?: ThisParameterType> ): boolndarray; @@ -665,7 +625,6 @@ declare function filter( x: boolndarray, predicate: Predicate( x: boolndarray, predicate: Predicate * * var y = filter( x, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2.0, 4.0, 8.0, 10.0 ] +* // returns [ 2.0, 4.0, 8.0, 10.0 ] */ declare function filter( x: genericndarray, predicate: Predicate, thisArg?: ThisParameterType> ): genericndarray; @@ -697,7 +653,6 @@ declare function filter( x: genericndarray, predica * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -711,10 +666,7 @@ declare function filter( x: genericndarray, predica * 'order': 'row-major' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2.0, 4.0, 8.0, 10.0 ] +* // returns [ 2.0, 4.0, 8.0, 10.0 ] */ declare function filter( x: float64ndarray, options: OrderOptions, predicate: Predicate, thisArg?: ThisParameterType> ): float64ndarray; @@ -732,7 +684,6 @@ declare function filter( x: float64ndarray, options: OrderOptions, * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float32Array = require( '@stdlib/array/float32' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -746,10 +697,7 @@ declare function filter( x: float64ndarray, options: OrderOptions, * 'order': 'row-major' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2.0, 4.0, 8.0, 10.0 ] +* // returns [ 2.0, 4.0, 8.0, 10.0 ] */ declare function filter( x: float32ndarray, options: OrderOptions, predicate: Predicate, thisArg?: ThisParameterType> ): float32ndarray; @@ -835,7 +783,6 @@ declare function filter( x: complex128ndarray, options: OrderOption * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Int32Array = require( '@stdlib/array/int32' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Int32Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); * var shape = [ 2, 3 ]; @@ -849,10 +796,7 @@ declare function filter( x: complex128ndarray, options: OrderOption * 'order': 'row-major' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: int32ndarray, options: OrderOptions, predicate: Predicate, thisArg?: ThisParameterType> ): int32ndarray; @@ -870,7 +814,6 @@ declare function filter( x: int32ndarray, options: OrderOptions, pr * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Int16Array = require( '@stdlib/array/int16' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Int16Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); * var shape = [ 2, 3 ]; @@ -884,10 +827,7 @@ declare function filter( x: int32ndarray, options: OrderOptions, pr * 'order': 'row-major' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: int16ndarray, options: OrderOptions, predicate: Predicate, thisArg?: ThisParameterType> ): int16ndarray; @@ -905,7 +845,6 @@ declare function filter( x: int16ndarray, options: OrderOptions, pr * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Int8Array = require( '@stdlib/array/int8' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Int8Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); * var shape = [ 2, 3 ]; @@ -919,10 +858,7 @@ declare function filter( x: int16ndarray, options: OrderOptions, pr * 'order': 'row-major' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: int8ndarray, options: OrderOptions, predicate: Predicate, thisArg?: ThisParameterType> ): int8ndarray; @@ -940,7 +876,6 @@ declare function filter( x: int8ndarray, options: OrderOptions, pre * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Uint32Array = require( '@stdlib/array/uint32' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Uint32Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); * var shape = [ 2, 3 ]; @@ -954,10 +889,7 @@ declare function filter( x: int8ndarray, options: OrderOptions, pre * 'order': 'row-major' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: uint32ndarray, options: OrderOptions, predicate: Predicate, thisArg?: ThisParameterType> ): uint32ndarray; @@ -975,7 +907,6 @@ declare function filter( x: uint32ndarray, options: OrderOptions, p * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Uint16Array = require( '@stdlib/array/uint16' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Uint16Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); * var shape = [ 2, 3 ]; @@ -989,10 +920,7 @@ declare function filter( x: uint32ndarray, options: OrderOptions, p * 'order': 'row-major' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: uint16ndarray, options: OrderOptions, predicate: Predicate, thisArg?: ThisParameterType> ): uint16ndarray; @@ -1010,7 +938,6 @@ declare function filter( x: uint16ndarray, options: OrderOptions, p * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Uint8Array = require( '@stdlib/array/uint8' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Uint8Array( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); * var shape = [ 2, 3 ]; @@ -1024,10 +951,7 @@ declare function filter( x: uint16ndarray, options: OrderOptions, p * 'order': 'row-major' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: uint8ndarray, options: OrderOptions, predicate: Predicate, thisArg?: ThisParameterType> ): uint8ndarray; @@ -1045,7 +969,6 @@ declare function filter( x: uint8ndarray, options: OrderOptions, pr * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Uint8ClampedArray = require( '@stdlib/array/uint8c' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Uint8ClampedArray( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ); * var shape = [ 2, 3 ]; @@ -1059,10 +982,7 @@ declare function filter( x: uint8ndarray, options: OrderOptions, pr * 'order': 'row-major' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: uint8cndarray, options: OrderOptions, predicate: Predicate, thisArg?: ThisParameterType> ): uint8cndarray; @@ -1079,7 +999,6 @@ declare function filter( x: uint8cndarray, options: OrderOptions, p * @example * var BooleanArray = require( '@stdlib/array/bool' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * function predicate( z ) { * return z; @@ -1097,10 +1016,7 @@ declare function filter( x: uint8cndarray, options: OrderOptions, p * 'order': 'row-major' * }; * var y = filter( x, opts, predicate ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ true, true, true, true ] +* // returns [ true, true, true, true ] */ declare function filter( x: boolndarray, options: OrderOptions, predicate: Predicate, thisArg?: ThisParameterType> ): boolndarray; @@ -1117,7 +1033,6 @@ declare function filter( x: boolndarray, options: OrderOptions, pre * @example * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ]; * var shape = [ 2, 3 ]; @@ -1131,10 +1046,7 @@ declare function filter( x: boolndarray, options: OrderOptions, pre * 'order': 'row-major' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2.0, 4.0, 8.0, 10.0 ] +* // returns [ 2.0, 4.0, 8.0, 10.0 ] */ declare function filter( x: genericndarray, options: OrderOptions, predicate: Predicate, thisArg?: ThisParameterType> ): genericndarray; @@ -1153,7 +1065,6 @@ declare function filter( x: genericndarray, options * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -1167,10 +1078,7 @@ declare function filter( x: genericndarray, options * 'dtype': 'float64' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2.0, 4.0, 8.0, 10.0 ] +* // returns [ 2.0, 4.0, 8.0, 10.0 ] */ declare function filter( x: typedndarray, options: Float64Options, predicate: Predicate, thisArg?: ThisParameterType> ): float64ndarray; @@ -1189,7 +1097,6 @@ declare function filter( x: typedndarray, options: * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -1203,10 +1110,7 @@ declare function filter( x: typedndarray, options: * 'dtype': 'float32' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2.0, 4.0, 8.0, 10.0 ] +* // returns [ 2.0, 4.0, 8.0, 10.0 ] */ declare function filter( x: typedndarray, options: Float32Options, predicate: Predicate, thisArg?: ThisParameterType> ): float32ndarray; @@ -1224,7 +1128,6 @@ declare function filter( x: typedndarray, options: * @example * var Complex128Array = require( '@stdlib/array/complex128' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * function predicate( z, idx ) { * return idx[ 0 ] > 0; @@ -1260,7 +1163,6 @@ declare function filter( x: typedndarray, options: * @example * var Complex128Array = require( '@stdlib/array/complex128' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * function predicate( z, idx ) { * return idx[ 0 ] > 0; @@ -1297,7 +1199,6 @@ declare function filter( x: typedndarray, options: * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -1311,10 +1212,7 @@ declare function filter( x: typedndarray, options: * 'dtype': 'int32' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: typedndarray, options: Int32Options, predicate: Predicate, thisArg?: ThisParameterType> ): int32ndarray; @@ -1333,7 +1231,6 @@ declare function filter( x: typedndarray, options: * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -1347,10 +1244,7 @@ declare function filter( x: typedndarray, options: * 'dtype': 'int16' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: typedndarray, options: Int16Options, predicate: Predicate, thisArg?: ThisParameterType> ): int16ndarray; @@ -1369,7 +1263,6 @@ declare function filter( x: typedndarray, options: * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -1383,10 +1276,7 @@ declare function filter( x: typedndarray, options: * 'dtype': 'int8' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: typedndarray, options: Int8Options, predicate: Predicate, thisArg?: ThisParameterType> ): int8ndarray; @@ -1405,7 +1295,6 @@ declare function filter( x: typedndarray, options: * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -1419,10 +1308,7 @@ declare function filter( x: typedndarray, options: * 'dtype': 'uint32' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: typedndarray, options: Uint32Options, predicate: Predicate, thisArg?: ThisParameterType> ): uint32ndarray; @@ -1441,7 +1327,6 @@ declare function filter( x: typedndarray, options: * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -1455,10 +1340,7 @@ declare function filter( x: typedndarray, options: * 'dtype': 'uint16' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: typedndarray, options: Uint16Options, predicate: Predicate, thisArg?: ThisParameterType> ): uint16ndarray; @@ -1477,7 +1359,6 @@ declare function filter( x: typedndarray, options: * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -1491,10 +1372,7 @@ declare function filter( x: typedndarray, options: * 'dtype': 'uint8' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: typedndarray, options: Uint8Options, predicate: Predicate, thisArg?: ThisParameterType> ): uint8ndarray; @@ -1513,7 +1391,6 @@ declare function filter( x: typedndarray, options: * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -1527,10 +1404,7 @@ declare function filter( x: typedndarray, options: * 'dtype': 'uint8c' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2, 4, 8, 10 ] +* // returns [ 2, 4, 8, 10 ] */ declare function filter( x: typedndarray, options: Uint8COptions, predicate: Predicate, thisArg?: ThisParameterType> ): uint8cndarray; @@ -1549,7 +1423,6 @@ declare function filter( x: typedndarray, options: * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -1563,10 +1436,7 @@ declare function filter( x: typedndarray, options: * 'dtype': 'bool' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ true, true, true, true ] +* // returns [ true, true, true, true ] */ declare function filter( x: typedndarray, options: BoolOptions, predicate: Predicate, thisArg?: ThisParameterType> ): boolndarray; @@ -1585,7 +1455,6 @@ declare function filter( x: typedndarray, options: * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -1599,10 +1468,7 @@ declare function filter( x: typedndarray, options: * 'dtype': 'generic' * }; * var y = filter( x, opts, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2.0, 4.0, 8.0, 10.0 ] +* // returns [ 2.0, 4.0, 8.0, 10.0 ] */ declare function filter( x: typedndarray, options: GenericOptions, predicate: Predicate, thisArg?: ThisParameterType> ): genericndarray; diff --git a/lib/node_modules/@stdlib/ndarray/filter/lib/index.js b/lib/node_modules/@stdlib/ndarray/filter/lib/index.js index be46a889250e..206670640010 100644 --- a/lib/node_modules/@stdlib/ndarray/filter/lib/index.js +++ b/lib/node_modules/@stdlib/ndarray/filter/lib/index.js @@ -27,7 +27,6 @@ * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * var filter = require( '@stdlib/ndarray/filter' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); @@ -39,10 +38,7 @@ * // returns * * var y = filter( x, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2.0, 4.0, 8.0, 10.0 ] +* // returns [ 2.0, 4.0, 8.0, 10.0 ] */ // MODULES // diff --git a/lib/node_modules/@stdlib/ndarray/filter/lib/main.js b/lib/node_modules/@stdlib/ndarray/filter/lib/main.js index 08d9fa55329a..cb6484437728 100644 --- a/lib/node_modules/@stdlib/ndarray/filter/lib/main.js +++ b/lib/node_modules/@stdlib/ndarray/filter/lib/main.js @@ -56,7 +56,6 @@ var format = require( '@stdlib/string/format' ); * var isEven = require( '@stdlib/assert/is-even' ).isPrimitive; * var Float64Array = require( '@stdlib/array/float64' ); * var ndarray = require( '@stdlib/ndarray/ctor' ); -* var ndarray2array = require( '@stdlib/ndarray/to-array' ); * * var buffer = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); * var shape = [ 2, 3 ]; @@ -67,10 +66,7 @@ var format = require( '@stdlib/string/format' ); * // returns * * var y = filter( x, isEven ); -* // returns -* -* var arr = ndarray2array( y ); -* // returns [ 2.0, 4.0, 8.0, 10.0 ] +* // returns [ 2.0, 4.0, 8.0, 10.0 ] */ function filter( x, options, predicate, thisArg ) { var hasOpts;