Skip to content

Commit 9f2c43f

Browse files
committed
Auto-generated commit
1 parent 770d65a commit 9f2c43f

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎CHANGELOG.md‎

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

709709
### Bug Fixes
710710

711+
- [`b2f66e9`](https://github.com/stdlib-js/stdlib/commit/b2f66e9b5dde7a2a858d27dfd27bd9ec490c9b56) - ensure correct order is returned and fix heading [(#12217)](https://github.com/stdlib-js/stdlib/pull/12217)
711712
- [`62d6dcc`](https://github.com/stdlib-js/stdlib/commit/62d6dcc0bd4c36e07c629811ab23831bfe65bf7a) - avoid duplicate validation overhead and fix default order resolution
712713
- [`0a917be`](https://github.com/stdlib-js/stdlib/commit/0a917be06f551443b9182813d5110711eefffae9) - fallback to default order when computing strides
713714
- [`1044235`](https://github.com/stdlib-js/stdlib/commit/1044235dd87754267232ac808add6c4bc30b064e) - fallback to default order upon ambiguous input
@@ -961,6 +962,7 @@ A total of 50 issues were closed in this release:
961962

962963
<details>
963964

965+
- [`b2f66e9`](https://github.com/stdlib-js/stdlib/commit/b2f66e9b5dde7a2a858d27dfd27bd9ec490c9b56) - **fix:** ensure correct order is returned and fix heading [(#12217)](https://github.com/stdlib-js/stdlib/pull/12217) _(by Philipp Burckhardt)_
964966
- [`ad8f9b5`](https://github.com/stdlib-js/stdlib/commit/ad8f9b59d9838fadeac1c3a7d53a5c6cfcf11365) - **bench:** refactor to use string interpolation in `ndarray/base` [(#11431)](https://github.com/stdlib-js/stdlib/pull/11431) _(by Karan Anand)_
965967
- [`8bc28dd`](https://github.com/stdlib-js/stdlib/commit/8bc28dd32b2b136b57c4c5c5d9298988e8d1ef47) - **refactor:** use utility to create objects having a consistent hidden shape _(by Athan Reines)_
966968
- [`050caba`](https://github.com/stdlib-js/stdlib/commit/050cabae51fef57497301d6a63e0e52fb929167d) - **docs:** update namespace table of contents [(#12213)](https://github.com/stdlib-js/stdlib/pull/12213) _(by stdlib-bot)_

‎base/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ var o = ns;
140140
- <span class="signature">[`minmaxViewBufferIndex( shape, strides, offset )`][@stdlib/ndarray/base/minmax-view-buffer-index]</span><span class="delimiter">: </span><span class="description">compute the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.</span>
141141
- <span class="signature">[`nansLike( x )`][@stdlib/ndarray/base/nans-like]</span><span class="delimiter">: </span><span class="description">create a NaN-filled ndarray having the same shape and data type as a provided ndarray.</span>
142142
- <span class="signature">[`nans( dtype, shape, order )`][@stdlib/ndarray/base/nans]</span><span class="delimiter">: </span><span class="description">create a NaN-filled ndarray having a specified shape and data type.</span>
143-
- <span class="signature">[`ndarraylike2descriptor( dtype, buffer, shape, strides, offset, order )`][@stdlib/ndarray/base/ndarraylike2descriptor]</span><span class="delimiter">: </span><span class="description">convert an ndarray-like object to an ndarray descriptor.</span>
143+
- <span class="signature">[`ndarraylike2descriptor( x )`][@stdlib/ndarray/base/ndarraylike2descriptor]</span><span class="delimiter">: </span><span class="description">convert an ndarray-like object to an ndarray descriptor.</span>
144144
- <span class="signature">[`ndarraylike2ndarray( x )`][@stdlib/ndarray/base/ndarraylike2ndarray]</span><span class="delimiter">: </span><span class="description">convert an ndarray-like object to an `ndarray`.</span>
145145
- <span class="signature">[`ndarraylike2object( x )`][@stdlib/ndarray/base/ndarraylike2object]</span><span class="delimiter">: </span><span class="description">convert an `ndarray`-like object to an object likely to have the same "shape".</span>
146146
- <span class="signature">[`ndarraylike2scalar( x )`][@stdlib/ndarray/base/ndarraylike2scalar]</span><span class="delimiter">: </span><span class="description">convert an ndarray-like object to a scalar value.</span>

‎base/ndarraylike2descriptor/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ limitations under the License.
4040
var ndarraylike2descriptor = require( '@stdlib/ndarray/base/ndarraylike2descriptor' );
4141
```
4242

43-
#### ndarraylike2descriptor( dtype, buffer, shape, strides, offset, order )
43+
#### ndarraylike2descriptor( x )
4444

4545
Converts an ndarray-like object to an ndarray [descriptor][@stdlib/ndarray/base/descriptor].
4646

‎base/order/lib/main.js‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,15 @@ function order( x ) {
6464
return ROW_MAJOR; // WARNING: default to row-major for ndarray-like objects lacking strides. This may or may not be accurate, and we're defaulting to row-major here based on the belief that row-major is more likely given that, e.g., JavaScript arrays are similar to C arrays (i.e., stored in row-major order).
6565
}
6666
o = strides2order( st );
67-
if ( o === 1 || o === 3 ) {
68-
return DEFAULT_ORDER; // for o == 3 (both row- and column-major; e.g., one-dimensional ndarrays), default to the default order
67+
if ( o === 1 ) {
68+
return ROW_MAJOR;
6969
}
7070
if ( o === 2 ) {
7171
return COLUMN_MAJOR;
7272
}
73+
if ( o === 3 ) {
74+
return DEFAULT_ORDER; // both row- and column-major (e.g., one-dimensional ndarrays); default to the default order
75+
}
7376
// o === 0
7477
if ( x.shape.length === 0 ) {
7578
return DEFAULT_ORDER; // default to the default order for zero-dimensional ndarrays

0 commit comments

Comments
 (0)