Skip to content

Commit c3d7a91

Browse files
committed
Auto-generated commit
1 parent 48790f5 commit c3d7a91

File tree

5 files changed

+40
-2
lines changed

5 files changed

+40
-2
lines changed

CHANGELOG.md

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

7-
## Unreleased (2024-12-31)
7+
## Unreleased (2025-01-01)
88

99
<section class="packages">
1010

@@ -86,6 +86,7 @@
8686

8787
##### Features
8888

89+
- [`33b46cb`](https://github.com/stdlib-js/stdlib/commit/33b46cbab14e25a72a7464d6d923f09a56ee0d44) - update namespace TypeScript declarations [(#4426)](https://github.com/stdlib-js/stdlib/pull/4426)
8990
- [`1ddeba9`](https://github.com/stdlib-js/stdlib/commit/1ddeba98295bb53fb8098d1016f0de4b7f544e96) - add `scalar2ndarrayLike` to namespace
9091
- [`58e795d`](https://github.com/stdlib-js/stdlib/commit/58e795db467b7bd1d3dc6c5847f91a97fed2ccff) - update namespace TypeScript declarations [(#3937)](https://github.com/stdlib-js/stdlib/pull/3937)
9192
- [`14427c7`](https://github.com/stdlib-js/stdlib/commit/14427c79bc62f82b16cbadc9d34749901e48d105) - add `fill`, `map`, and `toReversed` to namespace
@@ -529,6 +530,9 @@ A total of 3 people contributed to this release. Thank you to the following cont
529530

530531
<details>
531532

533+
- [`8a15baa`](https://github.com/stdlib-js/stdlib/commit/8a15baa639e8c4f45479821cf7331715e0546e86) - **docs:** update related packages sections [(#4425)](https://github.com/stdlib-js/stdlib/pull/4425) _(by stdlib-bot)_
534+
- [`33b46cb`](https://github.com/stdlib-js/stdlib/commit/33b46cbab14e25a72a7464d6d923f09a56ee0d44) - **feat:** update namespace TypeScript declarations [(#4426)](https://github.com/stdlib-js/stdlib/pull/4426) _(by stdlib-bot, Philipp Burckhardt)_
535+
- [`edae311`](https://github.com/stdlib-js/stdlib/commit/edae3110b4b7cc1d675d44e211ffffcff77d6153) - **docs:** update namespace table of contents [(#4428)](https://github.com/stdlib-js/stdlib/pull/4428) _(by stdlib-bot, Philipp Burckhardt)_
532536
- [`e4a53d5`](https://github.com/stdlib-js/stdlib/commit/e4a53d5816f5918f7c7fc5135dce21d676835eca) - **docs:** update related packages sections [(#4399)](https://github.com/stdlib-js/stdlib/pull/4399) _(by stdlib-bot)_
533537
- [`259b682`](https://github.com/stdlib-js/stdlib/commit/259b682b2fb67d03e2987ca02b57d0cbc631ae8e) - **feat:** add support for specifying an array index cache and add support for linear indexing _(by Athan Reines)_
534538
- [`1ddeba9`](https://github.com/stdlib-js/stdlib/commit/1ddeba98295bb53fb8098d1016f0de4b7f544e96) - **feat:** add `scalar2ndarrayLike` to namespace _(by Athan Reines)_

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ See [LICENSE][stdlib-license].
221221

222222
## Copyright
223223

224-
Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
224+
Copyright &copy; 2016-2025. The Stdlib [Authors][stdlib-authors].
225225

226226
</section>
227227

base/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ var o = ns;
7878
- <span class="signature">[`fliplr( x, writable )`][@stdlib/ndarray/base/fliplr]</span><span class="delimiter">: </span><span class="description">return a view of an input ndarray in which the order of elements along the last dimension is reversed.</span>
7979
- <span class="signature">[`flipud( x, writable )`][@stdlib/ndarray/base/flipud]</span><span class="delimiter">: </span><span class="description">return a view of an input ndarray in which the order of elements along the second-to-last dimension is reversed.</span>
8080
- <span class="signature">[`forEach( arrays, fcn[, thisArg] )`][@stdlib/ndarray/base/for-each]</span><span class="delimiter">: </span><span class="description">invoke a callback function once for each ndarray element.</span>
81+
- <span class="signature">[`scalar2ndarrayLike( x, value )`][@stdlib/ndarray/base/from-scalar-like]</span><span class="delimiter">: </span><span class="description">convert a scalar value to a zero-dimensional ndarray having the same data type as a provided ndarray.</span>
8182
- <span class="signature">[`scalar2ndarray( value, dtype, order )`][@stdlib/ndarray/base/from-scalar]</span><span class="delimiter">: </span><span class="description">convert a scalar value to a zero-dimensional ndarray.</span>
8283
- <span class="signature">[`ind( idx, max, mode )`][@stdlib/ndarray/base/ind]</span><span class="delimiter">: </span><span class="description">return an index given an index mode.</span>
8384
- <span class="signature">[`ind2sub( shape, strides, offset, order, idx, mode )`][@stdlib/ndarray/base/ind2sub]</span><span class="delimiter">: </span><span class="description">convert a linear index to an array of subscripts.</span>
@@ -266,6 +267,8 @@ console.log( objectKeys( ns ) );
266267

267268
[@stdlib/ndarray/base/for-each]: https://github.com/stdlib-js/ndarray/tree/main/base/for-each
268269

270+
[@stdlib/ndarray/base/from-scalar-like]: https://github.com/stdlib-js/ndarray/tree/main/base/from-scalar-like
271+
269272
[@stdlib/ndarray/base/from-scalar]: https://github.com/stdlib-js/ndarray/tree/main/base/from-scalar
270273

271274
[@stdlib/ndarray/base/ind]: https://github.com/stdlib-js/ndarray/tree/main/base/ind

base/docs/types/index.d.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import fliplr = require( './../../../base/fliplr' );
5757
import flipud = require( './../../../base/flipud' );
5858
import forEach = require( './../../../base/for-each' );
5959
import scalar2ndarray = require( './../../../base/from-scalar' );
60+
import scalar2ndarrayLike = require( './../../../base/from-scalar-like' );
6061
import ind = require( './../../../base/ind' );
6162
import ind2sub = require( './../../../base/ind2sub' );
6263
import iterationOrder = require( './../../../base/iteration-order' );
@@ -1143,6 +1144,33 @@ interface Namespace {
11431144
*/
11441145
scalar2ndarray: typeof scalar2ndarray;
11451146

1147+
/**
1148+
* Returns a zero-dimensional ndarray containing a provided scalar value and having the same data type as a provided input ndarray.
1149+
*
1150+
* @param x - input array
1151+
* @param value - scalar value
1152+
* @returns zero-dimensional ndarray
1153+
*
1154+
* @example
1155+
* var zeros = require( './../../../base/zeros' );
1156+
*
1157+
* var x = zeros( 'float64', [ 2, 2 ], 'row-major' );
1158+
* // returns <ndarray>
1159+
*
1160+
* var y = ns.scalar2ndarrayLike( x, 1.0 );
1161+
* // returns <ndarray>
1162+
*
1163+
* var sh = y.shape;
1164+
* // returns []
1165+
*
1166+
* var dt = y.dtype;
1167+
* // returns 'generic'
1168+
*
1169+
* var v = y.get();
1170+
* // returns 1.0
1171+
*/
1172+
scalar2ndarrayLike: typeof scalar2ndarrayLike;
1173+
11461174
/**
11471175
* Returns an index given an index mode.
11481176
*

map/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ console.log( ndarray2array( y ) );
239239

240240
- <span class="package-name">[`@stdlib/ndarray/filter`][@stdlib/ndarray/filter]</span><span class="delimiter">: </span><span class="description">return a shallow copy of an ndarray containing only those elements which pass a test implemented by a predicate function.</span>
241241
- <span class="package-name">[`@stdlib/ndarray/filter-map`][@stdlib/ndarray/filter-map]</span><span class="delimiter">: </span><span class="description">filter and map elements in an input ndarray to elements in a new output ndarray according to a callback function.</span>
242+
- <span class="package-name">[`@stdlib/ndarray/for-each`][@stdlib/ndarray/for-each]</span><span class="delimiter">: </span><span class="description">invoke a callback function once for each ndarray element.</span>
242243
- <span class="package-name">[`@stdlib/ndarray/slice`][@stdlib/ndarray/slice]</span><span class="delimiter">: </span><span class="description">return a read-only view of an input ndarray.</span>
243244

244245
</section>
@@ -259,6 +260,8 @@ console.log( ndarray2array( y ) );
259260

260261
[@stdlib/ndarray/filter-map]: https://github.com/stdlib-js/ndarray/tree/main/filter-map
261262

263+
[@stdlib/ndarray/for-each]: https://github.com/stdlib-js/ndarray/tree/main/for-each
264+
262265
[@stdlib/ndarray/slice]: https://github.com/stdlib-js/ndarray/tree/main/slice
263266

264267
<!-- </related-links> -->

0 commit comments

Comments
 (0)