Skip to content

Commit fbd09a1

Browse files
committed
Auto-generated commit
1 parent 9f6fa06 commit fbd09a1

3 files changed

Lines changed: 56 additions & 19 deletions

File tree

CHANGELOG.md

Lines changed: 4 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-24)
7+
## Unreleased (2026-03-25)
88

99
<section class="features">
1010

1111
### Features
1212

13+
- [`baef022`](https://github.com/stdlib-js/stdlib/commit/baef0223f86db141fa6a1dabc15ec6c5fa2f0f59) - update `ndarray/base` TypeScript declarations [(#11131)](https://github.com/stdlib-js/stdlib/pull/11131)
1314
- [`91e532c`](https://github.com/stdlib-js/stdlib/commit/91e532cf02003c24e6ee03c0d60d24b32169df4e) - add `ones` to namespace
1415
- [`78bcb59`](https://github.com/stdlib-js/stdlib/commit/78bcb5902c6120dfcf9e8472a6ce8c3d4f61968f) - add `ndarray/base/ones`
1516
- [`b6cd4ce`](https://github.com/stdlib-js/stdlib/commit/b6cd4ce12c9a6a123963dca5e8b8bd9647f2ac47) - update `ndarray/base` TypeScript declarations [(#11113)](https://github.com/stdlib-js/stdlib/pull/11113)
@@ -804,6 +805,8 @@ A total of 44 issues were closed in this release:
804805

805806
<details>
806807

808+
- [`60e78d4`](https://github.com/stdlib-js/stdlib/commit/60e78d484b31ca96b47f36c260db2620bd40f555) - **docs:** update `ndarray` TypeScript declarations [(#11132)](https://github.com/stdlib-js/stdlib/pull/11132) _(by stdlib-bot)_
809+
- [`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)_
807810
- [`ae72f8e`](https://github.com/stdlib-js/stdlib/commit/ae72f8e7910cbfd1a0204bedd7f46bff23c74aa0) - **test:** use corrected expected type for `complex64` tests _(by Athan Reines)_
808811
- [`2a1517f`](https://github.com/stdlib-js/stdlib/commit/2a1517fe8ee92381e9db01cab5f99241c542a6fc) - **test:** use correct expected type in complex64 tests for `ndarray/base/ones` _(by Philipp Burckhardt)_
809812
- [`7d9c0c0`](https://github.com/stdlib-js/stdlib/commit/7d9c0c0427c6e9cfc3e54df9d3156faaa88cbcc4) - **docs:** update docs and examples to accommodate dtype instances _(by Athan Reines)_

base/docs/types/index.d.ts

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ import nullaryBlockSize = require( './../../../base/nullary-tiling-block-size' )
120120
import numel = require( './../../../base/numel' );
121121
import numelDimension = require( './../../../base/numel-dimension' );
122122
import offset = require( './../../../base/offset' );
123+
import ones = require( './../../../base/ones' );
123124
import order = require( './../../../base/order' );
124125
import outputDataType = require( './../../../base/output-dtype' );
125126
import outputPolicyEnum2Str = require( './../../../base/output-policy-enum2str' );
@@ -3159,6 +3160,29 @@ interface Namespace {
31593160
*/
31603161
offset: typeof offset;
31613162

3163+
/**
3164+
* Creates a ones-filled array having a specified shape and data type.
3165+
*
3166+
* @param dtype - underlying data type
3167+
* @param shape - array shape
3168+
* @param order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)
3169+
* @returns ones-filled array
3170+
*
3171+
* @example
3172+
* var getShape = require( './../../../shape' );
3173+
* var getDType = require( './../../../dtype' );
3174+
*
3175+
* var arr = ns.ones( 'float64', [ 2, 2 ], 'row-major' );
3176+
* // returns <ndarray>[ [ 1.0, 1.0 ], [ 1.0, 1.0 ] ]
3177+
*
3178+
* var sh = getShape( arr );
3179+
* // returns [ 2, 2 ]
3180+
*
3181+
* var dt = String( getDType( arr ) );
3182+
* // returns 'float64'
3183+
*/
3184+
ones: typeof ones;
3185+
31623186
/**
31633187
* Returns the layout order of a provided ndarray.
31643188
*
@@ -5386,13 +5410,16 @@ interface Namespace {
53865410
* @returns zero-filled array
53875411
*
53885412
* @example
5413+
* var getShape = require( './../../../shape' );
5414+
* var getDType = require( './../../../dtype' );
5415+
*
53895416
* var arr = ns.zeros( 'float64', [ 2, 2 ], 'row-major' );
5390-
* // returns <ndarray>
5417+
* // returns <ndarray>[ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ]
53915418
*
5392-
* var sh = arr.shape;
5419+
* var sh = getShape( arr );
53935420
* // returns [ 2, 2 ]
53945421
*
5395-
* var dt = arr.dtype;
5422+
* var dt = String( getDType( arr ) );
53965423
* // returns 'float64'
53975424
*/
53985425
zeros: typeof zeros;
@@ -5404,24 +5431,26 @@ interface Namespace {
54045431
* @returns zero-filled array
54055432
*
54065433
* @example
5434+
* var getShape = require( './../../../shape' );
5435+
* var getDType = require( './../../../dtype' );
54075436
* var zeros = require( './../../../base/zeros' );
54085437
*
54095438
* var x = zeros( 'generic', [ 2, 2 ], 'row-major' );
5410-
* // returns <ndarray>
5439+
* // returns <ndarray>[ [ 0, 0 ], [ 0, 0 ] ]
54115440
*
5412-
* var sh = x.shape;
5441+
* var sh = getShape( x );
54135442
* // returns [ 2, 2 ]
54145443
*
5415-
* var dt = x.dtype;
5444+
* var dt = String( getDType( x ) );
54165445
* // returns 'generic'
54175446
*
54185447
* var y = ns.zerosLike( x );
5419-
* // returns <ndarray>
5448+
* // returns <ndarray>[ [ 0, 0 ], [ 0, 0 ] ]
54205449
*
5421-
* sh = y.shape;
5450+
* sh = getShape( y );
54225451
* // returns [ 2, 2 ]
54235452
*
5424-
* dt = y.dtype;
5453+
* dt = String( getDType( y ) );
54255454
* // returns 'generic'
54265455
*/
54275456
zerosLike: typeof zerosLike;

docs/types/index.d.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3410,13 +3410,16 @@ interface Namespace {
34103410
* @returns zero-filled array
34113411
*
34123412
* @example
3413+
* var getShape = require( './../../shape' );
3414+
* var getDType = require( './../../dtype' );
3415+
*
34133416
* var arr = ns.zeros( [ 2, 2 ] );
3414-
* // returns <ndarray>
3417+
* // returns <ndarray>[ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ]
34153418
*
3416-
* var sh = arr.shape;
3419+
* var sh = getShape( arr );
34173420
* // returns [ 2, 2 ]
34183421
*
3419-
* var dt = arr.dtype;
3422+
* var dt = String( getDType( arr ) );
34203423
* // returns 'float64'
34213424
*/
34223425
zeros: typeof zeros;
@@ -3435,26 +3438,28 @@ interface Namespace {
34353438
* @returns zero-filled array
34363439
*
34373440
* @example
3441+
* var getShape = require( './../../shape' );
3442+
* var getDType = require( './../../dtype' );
34383443
* var zeros = require( './../../zeros' );
34393444
*
34403445
* var x = zeros( [ 2, 2 ], {
34413446
* 'dtype': 'float64'
34423447
* });
3443-
* // returns <ndarray>
3448+
* // returns <ndarray>[ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ]
34443449
*
3445-
* var sh = x.shape;
3450+
* var sh = getShape( x );
34463451
* // returns [ 2, 2 ]
34473452
*
3448-
* var dt = x.dtype;
3453+
* var dt = String( getDType( x ) );
34493454
* // returns 'float64'
34503455
*
34513456
* var y = ns.zerosLike( x );
3452-
* // returns <ndarray>
3457+
* // returns <ndarray>[ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ]
34533458
*
3454-
* sh = y.shape;
3459+
* sh = getShape( y );
34553460
* // returns [ 2, 2 ]
34563461
*
3457-
* dt = y.dtype;
3462+
* dt = String( getDType( y ) );
34583463
* // returns 'float64'
34593464
*/
34603465
zerosLike: typeof zerosLike;

0 commit comments

Comments
 (0)