Skip to content

Commit 00984f9

Browse files
committed
Auto-generated commit
1 parent 82d00ce commit 00984f9

File tree

15 files changed

+18727
-3
lines changed

15 files changed

+18727
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,7 @@ A total of 34 issues were closed in this release:
641641

642642
<details>
643643

644+
- [`f870646`](https://github.com/stdlib-js/stdlib/commit/f870646312fdbc9c2fb63bcfa7094cf889ed75f1) - **test:** add tests to `ndarray/base/count-truthy` [(#8301)](https://github.com/stdlib-js/stdlib/pull/8301) _(by Muhammad Haris, Athan Reines)_
644645
- [`555d6f3`](https://github.com/stdlib-js/stdlib/commit/555d6f3a7931b2c898fc8a6474ba81879f56d4d3) - **test:** add tests to `ndarray/base/count-falsy` [(#8305)](https://github.com/stdlib-js/stdlib/pull/8305) _(by Muhammad Haris, Athan Reines)_
645646
- [`ce0bfa5`](https://github.com/stdlib-js/stdlib/commit/ce0bfa50e43dc1f8ee15679b6194c1349730de59) - **test:** fix underlying buffer type _(by Athan Reines)_
646647
- [`2c288dd`](https://github.com/stdlib-js/stdlib/commit/2c288dd3ff3e8b2e9b3a0c9189a019ec962f24e8) - **test:** add tests to `ndarray/base/count-if` [(#8318)](https://github.com/stdlib-js/stdlib/pull/8318) _(by Muhammad Haris, Athan Reines)_

base/count-truthy/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ function countTruthy( arrays ) {
274274
}
275275
// Check whether we were provided an empty ndarray...
276276
if ( len === 0 ) {
277-
return true;
277+
return 0;
278278
}
279279
// Determine whether the ndarray is one-dimensional and thus readily translates to a one-dimensional strided array...
280280
if ( ndims === 1 ) {

base/count-truthy/test/test.0d.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ tape( 'the function counts the number of truthy elements in a 0-dimensional ndar
6262
var actual;
6363
var x;
6464

65-
x = ndarray( 'float64', toAccessorArray( new Float64Array( [ 0.0 ] ) ), [], [ 0 ], 0, 'row-major' );
65+
x = ndarray( 'generic', toAccessorArray( new Float64Array( [ 0.0 ] ) ), [], [ 0 ], 0, 'row-major' );
6666

6767
actual = countTruthy( [ x ] );
6868
t.strictEqual( actual, 0, 'returns expected value' );
6969

70-
x = ndarray( 'float64', toAccessorArray( new Float64Array( [ 1.0 ] ) ), [], [ 0 ], 0, 'row-major' );
70+
x = ndarray( 'generic', toAccessorArray( new Float64Array( [ 1.0 ] ) ), [], [ 0 ], 0, 'row-major' );
7171

7272
actual = countTruthy( [ x ] );
7373
t.strictEqual( actual, 1, 'returns expected value' );

0 commit comments

Comments
 (0)