Skip to content

Commit a7f16d7

Browse files
committed
Auto-generated commit
1 parent d6ed3a3 commit a7f16d7

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173

174174
### Bug Fixes
175175

176+
- [`ae32f26`](https://github.com/stdlib-js/stdlib/commit/ae32f26441101c24f0faf1a04ecceb3e66387578) - ensure support for boolean arrays in polyfill
176177
- [`3a0b3cc`](https://github.com/stdlib-js/stdlib/commit/3a0b3cc30d966f8739511d4f0cedc73b07376e59) - improve `entries` return type and examples in `array/complex128` types
177178
- [`d3b0f25`](https://github.com/stdlib-js/stdlib/commit/d3b0f251b37fdc27cd3a02ac794dddba0b2f7b36) - correct loop bounds in toJSON method for `nested2views`
178179
- [`fbc5910`](https://github.com/stdlib-js/stdlib/commit/fbc5910c2290928c2fdc730a6b166b39e637d304) - remove unnecessary loop in toJSON method for entries2views
@@ -268,6 +269,7 @@ A total of 38 issues were closed in this release:
268269

269270
<details>
270271

272+
- [`ae32f26`](https://github.com/stdlib-js/stdlib/commit/ae32f26441101c24f0faf1a04ecceb3e66387578) - **fix:** ensure support for boolean arrays in polyfill _(by Athan Reines)_
271273
- [`08624f9`](https://github.com/stdlib-js/stdlib/commit/08624f9135cd19871865ea671a232f4d3149e639) - **docs:** improve doctests for complex number instances in `array/complex128` [(#10718)](https://github.com/stdlib-js/stdlib/pull/10718) _(by Aniket Sonawane, Athan Reines, stdlib-bot)_
272274
- [`a467bf0`](https://github.com/stdlib-js/stdlib/commit/a467bf0083da8f346611e53a684a78212f76d426) - **chore:** fix typos and incorrect test values [(#11270)](https://github.com/stdlib-js/stdlib/pull/11270) _(by Philipp Burckhardt)_
273275
- [`889f7b2`](https://github.com/stdlib-js/stdlib/commit/889f7b26c0cd56cfe9fd71d160ebcb22a4f3d99f) - **feat:** update `array` TypeScript declarations [(#11237)](https://github.com/stdlib-js/stdlib/pull/11237) _(by stdlib-bot)_

empty/lib/polyfill.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
// MODULES //
2222

23+
var BooleanArray = require( './../../bool' );
2324
var zeros = require( './../../zeros' );
2425

2526

@@ -44,8 +45,14 @@ var zeros = require( './../../zeros' );
4445
* // returns <Float32Array>
4546
*/
4647
function empty( length ) {
48+
var dt;
4749
if ( arguments.length > 1 ) {
48-
return zeros( length, arguments[ 1 ] );
50+
dt = arguments[ 1 ];
51+
if ( dt === 'bool' ) {
52+
// Special handle boolean arrays as `zeros` only supports numeric data types:
53+
return new BooleanArray( length );
54+
}
55+
return zeros( length, dt );
4956
}
5057
return zeros( length );
5158
}

0 commit comments

Comments
 (0)