From 131446e1ba3e3c34381fb90995436eea42f9ffad Mon Sep 17 00:00:00 2001 From: aman-095 Date: Tue, 5 Nov 2024 15:40:55 +0530 Subject: [PATCH] refactor: updated strided2object --- .../@stdlib/blas/base/drotm-wasm/test/test.main.js | 6 +++--- .../@stdlib/blas/base/drotm-wasm/test/test.ndarray.js | 6 +++--- .../@stdlib/strided/base/strided2object/lib/main.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/drotm-wasm/test/test.main.js b/lib/node_modules/@stdlib/blas/base/drotm-wasm/test/test.main.js index 5dc3be28eab..4cd909ae17a 100644 --- a/lib/node_modules/@stdlib/blas/base/drotm-wasm/test/test.main.js +++ b/lib/node_modules/@stdlib/blas/base/drotm-wasm/test/test.main.js @@ -677,9 +677,9 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the `main` method xe = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); ye = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] ); - // drotm.main( -1, x, 1, y, 1, param ); - // t.deepEqual( x, xe, 'returns expected value' ); - // t.deepEqual( y, ye, 'returns expected value' ); + drotm.main( -1, x, 1, y, 1, param ); + t.deepEqual( x, xe, 'returns expected value' ); + t.deepEqual( y, ye, 'returns expected value' ); drotm.main( 0, x, 1, y, 1, param ); t.deepEqual( x, xe, 'returns expected value' ); diff --git a/lib/node_modules/@stdlib/blas/base/drotm-wasm/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/drotm-wasm/test/test.ndarray.js index 1cb754fe67b..c1a200c0d2e 100644 --- a/lib/node_modules/@stdlib/blas/base/drotm-wasm/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/drotm-wasm/test/test.ndarray.js @@ -752,9 +752,9 @@ tape( 'if provided an `N` parameter less than or equal to `0`, a module instance xe = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] ); ye = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] ); - // drotm.ndarray( -1, x, 1, 0, y, 1, 0, param ); - // t.deepEqual( x, xe, 'returns expected value' ); - // t.deepEqual( y, ye, 'returns expected value' ); + drotm.ndarray( -1, x, 1, 0, y, 1, 0, param ); + t.deepEqual( x, xe, 'returns expected value' ); + t.deepEqual( y, ye, 'returns expected value' ); drotm.ndarray( 0, x, 1, 0, y, 1, 0, param ); t.deepEqual( x, xe, 'returns expected value' ); diff --git a/lib/node_modules/@stdlib/strided/base/strided2object/lib/main.js b/lib/node_modules/@stdlib/strided/base/strided2object/lib/main.js index 8c96d6c6774..4704abbc967 100644 --- a/lib/node_modules/@stdlib/strided/base/strided2object/lib/main.js +++ b/lib/node_modules/@stdlib/strided/base/strided2object/lib/main.js @@ -73,7 +73,7 @@ var arraylike2object = require( '@stdlib/array/base/arraylike2object' ); */ function strided2object( N, x, stride, offset ) { var obj = arraylike2object( x ); - obj.length = N; + obj.length = ( N > 0 ) ? N : 0; obj.stride = stride; obj.offset = offset; return obj;