Skip to content

Commit faa99cf

Browse files
committed
Auto-generated commit
1 parent 32696ed commit faa99cf

File tree

18 files changed

+1903
-2
lines changed

18 files changed

+1903
-2
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
##### Features
2222

23+
- [`3f4de77`](https://github.com/stdlib-js/stdlib/commit/3f4de77d333dea3962dec5f53858a4a2db86bd63) - add `ndarray/includes`
2324
- [`d8f2acf`](https://github.com/stdlib-js/stdlib/commit/d8f2acf4d31d3da271e7d2074ffb40a6317c4a23) - update namespace TypeScript declarations [(#6337)](https://github.com/stdlib-js/stdlib/pull/6337)
2425
- [`41b3b21`](https://github.com/stdlib-js/stdlib/commit/41b3b214c891ac64926296439240e2bf5f85de3f) - add `fillBy` to namespace
2526
- [`da8a676`](https://github.com/stdlib-js/stdlib/commit/da8a676ef0097af7ad60e7379b52930e03d65c95) - update namespace TypeScript declarations [(#6315)](https://github.com/stdlib-js/stdlib/pull/6315)
@@ -325,6 +326,28 @@ This release closes the following issue:
325326

326327
<!-- /.package -->
327328

329+
<section class="package" id="ndarray-base-broadcast-scalar-unreleased">
330+
331+
#### [@stdlib/ndarray/base/broadcast-scalar](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/broadcast-scalar)
332+
333+
<details>
334+
335+
<section class="bug-fixes">
336+
337+
##### Bug Fixes
338+
339+
- [`043dc69`](https://github.com/stdlib-js/stdlib/commit/043dc69c76ea6780cbba2c223417fccda4685c7a) - handle 0d edge case
340+
341+
</section>
342+
343+
<!-- /.bug-fixes -->
344+
345+
</details>
346+
347+
</section>
348+
349+
<!-- /.package -->
350+
328351
<section class="package" id="ndarray-base-bytes-per-element-unreleased">
329352

330353
#### [@stdlib/ndarray/base/bytes-per-element](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/base/bytes-per-element)
@@ -911,6 +934,7 @@ This release closes the following issue:
911934

912935
##### Bug Fixes
913936

937+
- [`f0d205d`](https://github.com/stdlib-js/stdlib/commit/f0d205d7073055c7a69f1ba7ccee95671ab762ba) - address indexing error
914938
- [`5768926`](https://github.com/stdlib-js/stdlib/commit/5768926be4fb253947f5d44bcf6b9d8bb5c75274) - update error message
915939
- [`7378f4d`](https://github.com/stdlib-js/stdlib/commit/7378f4db96fc059523a6f181388aa8f4fa202675) - ensure support when providing no dimensions to reduce
916940
- [`91778b7`](https://github.com/stdlib-js/stdlib/commit/91778b7ca6ae2c6ee0c6017687426c3952d90098) - handle scenario where a core dimension is zero
@@ -1397,6 +1421,9 @@ A total of 11 people contributed to this release. Thank you to the following con
13971421

13981422
<details>
13991423

1424+
- [`3f4de77`](https://github.com/stdlib-js/stdlib/commit/3f4de77d333dea3962dec5f53858a4a2db86bd63) - **feat:** add `ndarray/includes` _(by Athan Reines)_
1425+
- [`f0d205d`](https://github.com/stdlib-js/stdlib/commit/f0d205d7073055c7a69f1ba7ccee95671ab762ba) - **fix:** address indexing error _(by Athan Reines)_
1426+
- [`043dc69`](https://github.com/stdlib-js/stdlib/commit/043dc69c76ea6780cbba2c223417fccda4685c7a) - **fix:** handle 0d edge case _(by Athan Reines)_
14001427
- [`560e643`](https://github.com/stdlib-js/stdlib/commit/560e643d902d37529d503ba1c8bf5ac0dd88f926) - **chore:** fix EditorConfig lint errors [(#6549)](https://github.com/stdlib-js/stdlib/pull/6549) _(by Muhammad Taaha Tariq, Athan Reines)_
14011428
- [`128019a`](https://github.com/stdlib-js/stdlib/commit/128019a60f5fde63b21804d5914dba020e5d53a4) - **docs:** update examples _(by Athan Reines)_
14021429
- [`ac2b843`](https://github.com/stdlib-js/stdlib/commit/ac2b843dd8a6341d876c559cf8d79ab8bdf7ac46) - **bench:** fix invocations _(by Athan Reines)_

base/broadcast-scalar/lib/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ var format = require( '@stdlib/string/format' );
5858
function broadcastScalar( value, dtype, shape, order ) {
5959
var buf;
6060
var set;
61+
var N;
6162

6263
buf = buffer( dtype, 1 );
6364
if ( buf === null ) {
@@ -72,7 +73,8 @@ function broadcastScalar( value, dtype, shape, order ) {
7273
set = setter( dtype );
7374
}
7475
set( buf, 0, value );
75-
return new ndarray( dtype, buf, shape, zeros( shape.length ), 0, order );
76+
N = shape.length || 1;
77+
return new ndarray( dtype, buf, shape, zeros( N ), 0, order );
7678
}
7779

7880

base/broadcast-scalar/test/test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,3 +337,21 @@ tape( 'the function returns a broadcasted ndarray (dtype=generic)', function tes
337337

338338
t.end();
339339
});
340+
341+
tape( 'the function returns a broadcasted ndarray (dtype=generic, ndims=0)', function test( t ) {
342+
var expected;
343+
var arr;
344+
345+
expected = [ 1 ];
346+
arr = broadcastScalar( 1, 'generic', [], 'column-major' );
347+
348+
t.strictEqual( instanceOf( arr, base ), true, 'returns expected value' );
349+
t.strictEqual( arr.dtype, 'generic', 'returns expected value' );
350+
t.deepEqual( arr.shape, [], 'returns expected value' );
351+
t.strictEqual( instanceOf( arr.data, Array ), true, 'returns expected value' );
352+
t.deepEqual( arr.data, expected, 'returns expected value' );
353+
t.strictEqual( arr.order, 'column-major', 'returns expected value' );
354+
t.strictEqual( arr.length, 1, 'returns expected value' );
355+
356+
t.end();
357+
});

base/unary-reduce-subarray/lib/set_view_offsets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function setViewOffsets( views, offsets ) {
4040
if ( i === 1 ) { // note: expected to correspond to the output ndarray which does not have a corresponding view
4141
continue;
4242
}
43-
views[ j ].offset = offsets[ j ];
43+
views[ j ].offset = offsets[ i ];
4444
j += 1;
4545
}
4646
return views;

0 commit comments

Comments
 (0)