Skip to content

Commit 9883f84

Browse files
committed
Auto-generated commit
1 parent 4509211 commit 9883f84

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,6 +1629,8 @@ A total of 13 people contributed to this release. Thank you to the following con
16291629

16301630
<details>
16311631

1632+
- [`bd6213b`](https://github.com/stdlib-js/stdlib/commit/bd6213b8c0aceedc4681ef581768820ff1911e4e) - **refactor:** precompute shape and strides _(by Athan Reines)_
1633+
- [`38e6862`](https://github.com/stdlib-js/stdlib/commit/38e6862ed900b11bde5596931df3adfd652118ee) - **refactor:** precompute shape and strides _(by Athan Reines)_
16321634
- [`ad90a38`](https://github.com/stdlib-js/stdlib/commit/ad90a38e1d8eabd6476c7c086ac1f82f2742d386) - **fix:** ensure correct shape and strides _(by Athan Reines)_
16331635
- [`1d0c130`](https://github.com/stdlib-js/stdlib/commit/1d0c13090eff8e9802ebd43c8628529309895b11) - **fix:** ensure correct shape and strides _(by Athan Reines)_
16341636
- [`d389d89`](https://github.com/stdlib-js/stdlib/commit/d389d8905c302347394f2df9d9553b3d02d4c759) - **feat:** add `ndarray/base/unary-strided1d` _(by Athan Reines)_

base/unary-reduce-strided1d/lib/reshape_strategy.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ function broadcast( x ) {
6969
* @returns {Function} function for returning an ndarray view
7070
*/
7171
function squeeze( arr, index ) {
72+
var sh = [ arr.shape[ index ] ];
73+
var sx = [ arr.strides[ index ] ];
7274
return reshape;
7375

7476
/**
@@ -83,8 +85,8 @@ function squeeze( arr, index ) {
8385
return {
8486
'dtype': x.dtype,
8587
'data': x.data,
86-
'shape': [ arr.shape[ index ] ],
87-
'strides': [ arr.strides[ index ] ],
88+
'shape': sh,
89+
'strides': sx,
8890
'offset': x.offset,
8991
'order': x.order
9092
};

base/unary-strided1d/lib/strategy.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ function broadcast( x ) {
6969
* @returns {Function} function for returning an ndarray view
7070
*/
7171
function squeeze( arr, index ) {
72+
var sh = [ arr.shape[ index ] ];
73+
var sx = [ arr.strides[ index ] ];
7274
return reshape;
7375

7476
/**
@@ -83,8 +85,8 @@ function squeeze( arr, index ) {
8385
return {
8486
'dtype': x.dtype,
8587
'data': x.data,
86-
'shape': [ arr.shape[ index ] ],
87-
'strides': [ arr.strides[ index ] ],
88+
'shape': sh,
89+
'strides': sx,
8890
'offset': x.offset,
8991
'order': x.order
9092
};

0 commit comments

Comments
 (0)