From 0ac713e6917e4294b5d73470fdfeadfd9f230a71 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sat, 9 Nov 2024 20:52:42 +0000 Subject: [PATCH] Auto-generated commit --- .github/.keepalive | 1 - CHANGELOG.md | 15 ++++++++++++++- test/test.dnansumkbn.js | 12 ++++++++++++ test/test.dnansumkbn.native.js | 12 ++++++++++++ test/test.ndarray.js | 12 ++++++++++++ test/test.ndarray.native.js | 12 ++++++++++++ 6 files changed, 62 insertions(+), 2 deletions(-) delete mode 100644 .github/.keepalive diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 15bf6db..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-11-01T04:39:01.672Z diff --git a/CHANGELOG.md b/CHANGELOG.md index e635cc5..f3f4a69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@
-## Unreleased (2024-11-01) +## Unreleased (2024-11-09)
@@ -16,12 +16,25 @@ +
+ +### Closed Issues + +This release closes the following issue: + +[#3046](https://github.com/stdlib-js/stdlib/issues/3046) + +
+ + +
### Commits
+- [`cc6362b`](https://github.com/stdlib-js/stdlib/commit/cc6362bffb6dbff54c3dd69257dfcb2dd7d372f4) - **test:** achieve 100% test coverage for `blas/ext/base/dnansumkbn` [(#3051)](https://github.com/stdlib-js/stdlib/pull/3051) _(by Muhammad Haris)_ - [`371a494`](https://github.com/stdlib-js/stdlib/commit/371a49427e62050eb23947678b66aa529ee3890b) - **feat:** add C `ndarray` API and refactor `blas/ext/base/dnansumkbn` [(#2996)](https://github.com/stdlib-js/stdlib/pull/2996) _(by Muhammad Haris, Athan Reines)_
diff --git a/test/test.dnansumkbn.js b/test/test.dnansumkbn.js index 354fd5a..ad069c1 100644 --- a/test/test.dnansumkbn.js +++ b/test/test.dnansumkbn.js @@ -162,6 +162,18 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the s t.end(); }); +tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', function test( t ) { + var x; + var v; + + x = new Float64Array( [ NaN, -2.0, -4.0, 5.0, 3.0 ] ); + + v = dnansumkbn( x.length, x, 0 ); + t.strictEqual( v, 0.0, 'returns expected value' ); + + t.end(); +}); + tape( 'the function supports view offsets', function test( t ) { var x0; var x1; diff --git a/test/test.dnansumkbn.native.js b/test/test.dnansumkbn.native.js index 2f2eae7..2694c94 100644 --- a/test/test.dnansumkbn.native.js +++ b/test/test.dnansumkbn.native.js @@ -253,6 +253,18 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the s t.end(); }); +tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', opts, function test( t ) { + var x; + var v; + + x = new Float64Array( [ NaN, -2.0, -4.0, 5.0, 3.0 ] ); + + v = dnansumkbn( x.length, x, 0 ); + t.strictEqual( v, 0.0, 'returns expected value' ); + + t.end(); +}); + tape( 'the function supports view offsets', opts, function test( t ) { var x0; var x1; diff --git a/test/test.ndarray.js b/test/test.ndarray.js index a7d3906..5a98e67 100644 --- a/test/test.ndarray.js +++ b/test/test.ndarray.js @@ -162,6 +162,18 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the s t.end(); }); +tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', function test( t ) { + var x; + var v; + + x = new Float64Array( [ NaN, -2.0, -4.0, 5.0, 3.0 ] ); + + v = dnansumkbn( x.length, x, 0, 0 ); + t.strictEqual( v, 0.0, 'returns expected value' ); + + t.end(); +}); + tape( 'the function supports an `offset` parameter', function test( t ) { var x; var v; diff --git a/test/test.ndarray.native.js b/test/test.ndarray.native.js index 4c49677..7204fdc 100644 --- a/test/test.ndarray.native.js +++ b/test/test.ndarray.native.js @@ -171,6 +171,18 @@ tape( 'if provided a `stride` parameter equal to `0`, the function returns the s t.end(); }); +tape( 'if provided a `stride` parameter equal to `0` and the first element is NaN, the function returns 0', opts, function test( t ) { + var x; + var v; + + x = new Float64Array( [ NaN, -2.0, -4.0, 5.0, 3.0 ] ); + + v = dnansumkbn( x.length, x, 0, 0 ); + t.strictEqual( v, 0.0, 'returns expected value' ); + + t.end(); +}); + tape( 'the function supports an `offset` parameter', opts, function test( t ) { var x; var v;