Skip to content

Commit a4bd3d4

Browse files
committed
Auto-generated commit
1 parent bf09427 commit a4bd3d4

2 files changed

Lines changed: 43 additions & 10 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-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)
@@ -89,6 +90,9 @@ This release closes the following issue:
8990

9091
<details>
9192

93+
- [`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)_
94+
- [`ae72f8e`](https://github.com/stdlib-js/stdlib/commit/ae72f8e7910cbfd1a0204bedd7f46bff23c74aa0) - **test:** use corrected expected type for `complex64` tests _(by Athan Reines)_
95+
- [`2a1517f`](https://github.com/stdlib-js/stdlib/commit/2a1517fe8ee92381e9db01cab5f99241c542a6fc) - **test:** use correct expected type in complex64 tests for `ndarray/base/ones` _(by Philipp Burckhardt)_
9296
- [`91e532c`](https://github.com/stdlib-js/stdlib/commit/91e532cf02003c24e6ee03c0d60d24b32169df4e) - **feat:** add `ones` to namespace _(by Athan Reines)_
9397
- [`78bcb59`](https://github.com/stdlib-js/stdlib/commit/78bcb5902c6120dfcf9e8472a6ce8c3d4f61968f) - **feat:** add `ndarray/base/ones` _(by Athan Reines)_
9498
- [`5173151`](https://github.com/stdlib-js/stdlib/commit/5173151500a9e3781c617de1037ba92f1c860d79) - **style:** remove empty line _(by Athan Reines)_

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( '@stdlib/ndarray-base-nullary-tiling-block-si
120120
import numel = require( '@stdlib/ndarray-base-numel' );
121121
import numelDimension = require( '@stdlib/ndarray-base-numel-dimension' );
122122
import offset = require( '@stdlib/ndarray-base-offset' );
123+
import ones = require( '@stdlib/ndarray-base-ones' );
123124
import order = require( '@stdlib/ndarray-base-order' );
124125
import outputDataType = require( '@stdlib/ndarray-base-output-dtype' );
125126
import outputPolicyEnum2Str = require( '@stdlib/ndarray-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( '@stdlib/ndarray-shape' );
3173+
* var getDType = require( '@stdlib/ndarray-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( '@stdlib/ndarray-shape' );
5414+
* var getDType = require( '@stdlib/ndarray-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( '@stdlib/ndarray-shape' );
5435+
* var getDType = require( '@stdlib/ndarray-dtype' );
54075436
* var zeros = require( '@stdlib/ndarray-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;

0 commit comments

Comments
 (0)