Skip to content

Commit 2734e77

Browse files
committed
Auto-generated commit
1 parent 237d895 commit 2734e77

2 files changed

Lines changed: 42 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2026-03-25)
7+
## Unreleased (2026-03-26)
88

99
<section class="features">
1010

1111
### Features
1212

13+
- [`569131f`](https://github.com/stdlib-js/stdlib/commit/569131f478009cf40b7c3810ac6b1a084634283d) - update `ndarray/base` TypeScript declarations [(#11149)](https://github.com/stdlib-js/stdlib/pull/11149)
1314
- [`e00d73a`](https://github.com/stdlib-js/stdlib/commit/e00d73a3cb8c5355a46771ed5630d178e25ec0f4) - add `onesLike` to namespace
1415
- [`d200536`](https://github.com/stdlib-js/stdlib/commit/d200536a79672d3a31022f894a63acdf08b79159) - add `ndarray/base/ones-like`
1516
- [`baef022`](https://github.com/stdlib-js/stdlib/commit/baef0223f86db141fa6a1dabc15ec6c5fa2f0f59) - update `ndarray/base` TypeScript declarations [(#11131)](https://github.com/stdlib-js/stdlib/pull/11131)
@@ -92,6 +93,9 @@ This release closes the following issue:
9293

9394
<details>
9495

96+
- [`569131f`](https://github.com/stdlib-js/stdlib/commit/569131f478009cf40b7c3810ac6b1a084634283d) - **feat:** update `ndarray/base` TypeScript declarations [(#11149)](https://github.com/stdlib-js/stdlib/pull/11149) _(by stdlib-bot)_
97+
- [`bbd8f0e`](https://github.com/stdlib-js/stdlib/commit/bbd8f0eec8d6d52201d7706a349fdb9cac737d9c) - **refactor:** avoid unnecessary offset calculation _(by Athan Reines)_
98+
- [`f759b2b`](https://github.com/stdlib-js/stdlib/commit/f759b2b5ed4db16f35f0544fb65ed38a957f9f7b) - **refactor:** remove overloads and use generic _(by Athan Reines)_
9599
- [`e00d73a`](https://github.com/stdlib-js/stdlib/commit/e00d73a3cb8c5355a46771ed5630d178e25ec0f4) - **feat:** add `onesLike` to namespace _(by Athan Reines)_
96100
- [`d200536`](https://github.com/stdlib-js/stdlib/commit/d200536a79672d3a31022f894a63acdf08b79159) - **feat:** add `ndarray/base/ones-like` _(by Athan Reines)_
97101
- [`baef022`](https://github.com/stdlib-js/stdlib/commit/baef0223f86db141fa6a1dabc15ec6c5fa2f0f59) - **feat:** update `ndarray/base` TypeScript declarations [(#11131)](https://github.com/stdlib-js/stdlib/pull/11131) _(by stdlib-bot)_

docs/types/index.d.ts

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ import numel = require( '@stdlib/ndarray-base-numel' );
121121
import numelDimension = require( '@stdlib/ndarray-base-numel-dimension' );
122122
import offset = require( '@stdlib/ndarray-base-offset' );
123123
import ones = require( '@stdlib/ndarray-base-ones' );
124+
import onesLike = require( '@stdlib/ndarray-base-ones-like' );
124125
import order = require( '@stdlib/ndarray-base-order' );
125126
import outputDataType = require( '@stdlib/ndarray-base-output-dtype' );
126127
import outputPolicyEnum2Str = require( '@stdlib/ndarray-base-output-policy-enum2str' );
@@ -3183,6 +3184,37 @@ interface Namespace {
31833184
*/
31843185
ones: typeof ones;
31853186

3187+
/**
3188+
* Creates a ones-filled array having the same shape and data type as a provided input ndarray.
3189+
*
3190+
* @param x - input array
3191+
* @returns ones-filled array
3192+
*
3193+
* @example
3194+
* var getShape = require( '@stdlib/ndarray-shape' );
3195+
* var getDType = require( '@stdlib/ndarray-dtype' );
3196+
* var ones = require( '@stdlib/ndarray-base-ones' );
3197+
*
3198+
* var x = ones( 'float64', [ 2, 2 ], 'row-major' );
3199+
* // returns <ndarray>[ [ 1.0, 1.0 ], [ 1.0, 1.0 ] ]
3200+
*
3201+
* var sh = getShape( x );
3202+
* // returns [ 2, 2 ]
3203+
*
3204+
* var dt = String( getDType( x ) );
3205+
* // returns 'float64'
3206+
*
3207+
* var y = ns.onesLike( x );
3208+
* // returns <ndarray>[ [ 1.0, 1.0 ], [ 1.0, 1.0 ] ]
3209+
*
3210+
* sh = getShape( y );
3211+
* // returns [ 2, 2 ]
3212+
*
3213+
* dt = String( getDType( y ) );
3214+
* // returns 'float64'
3215+
*/
3216+
onesLike: typeof onesLike;
3217+
31863218
/**
31873219
* Returns the layout order of a provided ndarray.
31883220
*
@@ -5435,23 +5467,23 @@ interface Namespace {
54355467
* var getDType = require( '@stdlib/ndarray-dtype' );
54365468
* var zeros = require( '@stdlib/ndarray-base-zeros' );
54375469
*
5438-
* var x = zeros( 'generic', [ 2, 2 ], 'row-major' );
5439-
* // returns <ndarray>[ [ 0, 0 ], [ 0, 0 ] ]
5470+
* var x = zeros( 'float64', [ 2, 2 ], 'row-major' );
5471+
* // returns <ndarray>[ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ]
54405472
*
54415473
* var sh = getShape( x );
54425474
* // returns [ 2, 2 ]
54435475
*
54445476
* var dt = String( getDType( x ) );
5445-
* // returns 'generic'
5477+
* // returns 'float64'
54465478
*
54475479
* var y = ns.zerosLike( x );
5448-
* // returns <ndarray>[ [ 0, 0 ], [ 0, 0 ] ]
5480+
* // returns <ndarray>[ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ]
54495481
*
54505482
* sh = getShape( y );
54515483
* // returns [ 2, 2 ]
54525484
*
54535485
* dt = String( getDType( y ) );
5454-
* // returns 'generic'
5486+
* // returns 'float64'
54555487
*/
54565488
zerosLike: typeof zerosLike;
54575489

0 commit comments

Comments
 (0)