From 9ebad117087927a7366cfd9527e5fe54863b0277 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 10 May 2026 14:22:28 +0000 Subject: [PATCH] test(@stdlib/strided/base/map-by2): fix `Complex64` import in tests Both test files imported `Complex64` from `@stdlib/complex/float64/ctor` (the `Complex128` constructor, 64-bit real + 64-bit imaginary) instead of `@stdlib/complex/float32/ctor` (the correct `Complex64` constructor, 32-bit real + 32-bit imaginary). The variable is used to construct expected values inserted into `Complex64Array` slots; using the wrong type makes the test semantically incorrect even though the only instantiation is `new Complex64( 0.0, 0.0 )` (zero is exactly representable in float32, so assertions do not fail numerically, but the wrong constructor is resolved at require-time and the wrong type is used throughout). The same defect was fixed in the sibling package `@stdlib/strided/base/binary` (commit 9a829b3, labeled "Bug"). Ref: https://github.com/stdlib-js/stdlib/commit/9a829b3090c6d1662462f32bf494bce378b3f955 --- lib/node_modules/@stdlib/strided/base/map-by2/test/test.main.js | 2 +- .../@stdlib/strided/base/map-by2/test/test.ndarray.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/strided/base/map-by2/test/test.main.js b/lib/node_modules/@stdlib/strided/base/map-by2/test/test.main.js index fa1de03d89e3..1a7b3a86fbb4 100644 --- a/lib/node_modules/@stdlib/strided/base/map-by2/test/test.main.js +++ b/lib/node_modules/@stdlib/strided/base/map-by2/test/test.main.js @@ -28,7 +28,7 @@ var cidentityf = require( '@stdlib/complex/float32/base/identity' ); var Float64Array = require( '@stdlib/array/float64' ); var Float32Array = require( '@stdlib/array/float32' ); var Complex64Array = require( '@stdlib/array/complex64' ); -var Complex64 = require( '@stdlib/complex/float64/ctor' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); var mapBy2 = require( './../lib/main.js' ); diff --git a/lib/node_modules/@stdlib/strided/base/map-by2/test/test.ndarray.js b/lib/node_modules/@stdlib/strided/base/map-by2/test/test.ndarray.js index 1f525184cf4e..06677cee754a 100644 --- a/lib/node_modules/@stdlib/strided/base/map-by2/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/strided/base/map-by2/test/test.ndarray.js @@ -28,7 +28,7 @@ var cidentityf = require( '@stdlib/complex/float32/base/identity' ); var Float64Array = require( '@stdlib/array/float64' ); var Float32Array = require( '@stdlib/array/float32' ); var Complex64Array = require( '@stdlib/array/complex64' ); -var Complex64 = require( '@stdlib/complex/float64/ctor' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); var mapBy2 = require( './../lib/ndarray.js' );