Skip to content

Commit a822136

Browse files
committed
Auto-generated commit
1 parent d536e63 commit a822136

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

CHANGELOG.md

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

2121
##### Features
2222

23+
- [`bd678e5`](https://github.com/stdlib-js/stdlib/commit/bd678e56ad259f1424590d1e1ce213dc038cc676) - update namespace TypeScript declarations [(#2425)](https://github.com/stdlib-js/stdlib/pull/2425)
2324
- [`0b727a5`](https://github.com/stdlib-js/stdlib/commit/0b727a5d922225d23693e456b5f7b5b82f63750a) - add `mskput` to namespace
2425
- [`82a217c`](https://github.com/stdlib-js/stdlib/commit/82a217c79f7c10d4aca129fbaba753ce5055115a) - add `place` to namespace
2526
- [`cd14ed3`](https://github.com/stdlib-js/stdlib/commit/cd14ed3f1bbc7f0cc7dc55d155e6fa86c90adb23) - update namespace TypeScript declarations [(#2402)](https://github.com/stdlib-js/stdlib/pull/2402)
@@ -2186,6 +2187,7 @@ A total of 13 people contributed to this release. Thank you to the following con
21862187

21872188
<details>
21882189

2190+
- [`bd678e5`](https://github.com/stdlib-js/stdlib/commit/bd678e56ad259f1424590d1e1ce213dc038cc676) - **feat:** update namespace TypeScript declarations [(#2425)](https://github.com/stdlib-js/stdlib/pull/2425) _(by stdlib-bot, Athan Reines)_
21892191
- [`4f30f21`](https://github.com/stdlib-js/stdlib/commit/4f30f213c8ec0a95cdcd7dfe7e7a6bf4bec8bd36) - **feat:** add boolean dtype support to `array/reviver` [(#2420)](https://github.com/stdlib-js/stdlib/pull/2420) _(by Jaysukh Makvana)_
21902192
- [`42c67e7`](https://github.com/stdlib-js/stdlib/commit/42c67e76cdf919e4e43ff9333d9acc6177eb5558) - **feat:** add `every` and `some` methods to `array/bool` [(#2421)](https://github.com/stdlib-js/stdlib/pull/2421) _(by Jaysukh Makvana, Athan Reines)_
21912193
- [`d301be9`](https://github.com/stdlib-js/stdlib/commit/d301be9e2cabe07efe219c00d10aebd15e0673e7) - **fix:** ensure support for real-to-complex casting in boolean and mask array indexing _(by Athan Reines)_

docs/types/index.d.ts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import logspace = require( './../../logspace' );
5656
import minDataType = require( './../../min-dtype' );
5757
import mostlySafeCasts = require( './../../mostly-safe-casts' );
5858
import mskfilter = require( './../../mskfilter' );
59+
import mskput = require( './../../mskput' );
5960
import mskreject = require( './../../mskreject' );
6061
import nans = require( './../../nans' );
6162
import nansLike = require( './../../nans-like' );
@@ -64,6 +65,7 @@ import oneTo = require( './../../one-to' );
6465
import oneToLike = require( './../../one-to-like' );
6566
import ones = require( './../../ones' );
6667
import onesLike = require( './../../ones-like' );
68+
import place = require( './../../place' );
6769
import typedarraypool = require( './../../pool' );
6870
import promotionRules = require( './../../promotion-rules' );
6971
import put = require( './../../put' );
@@ -932,6 +934,38 @@ interface Namespace {
932934
*/
933935
mskfilter: typeof mskfilter;
934936

937+
/**
938+
* Replaces elements of an array with provided values according to a provided mask array.
939+
*
940+
* @param x - input array
941+
* @param mask - mask array
942+
* @param values - values to set
943+
* @param options - function options
944+
* @returns input array
945+
*
946+
* @example
947+
* var x = [ 1, 2, 3, 4 ];
948+
*
949+
* var mask = [ 1, 0, 0, 1 ];
950+
* var values = [ 20, 30 ];
951+
*
952+
* var out = ns.mskput( x, mask, values );
953+
* // returns [ 1, 20, 30, 4 ]
954+
*
955+
* var bool = ( out === x );
956+
* // returns true
957+
*
958+
* @example
959+
* var x = [ 1, 2, 3, 4 ];
960+
*
961+
* var out = ns.mskput( x, [ 1, 0, 0, 1 ], [ 30 ] );
962+
* // returns [ 1, 30, 30, 4 ]
963+
*
964+
* var bool = ( out === x );
965+
* // returns true
966+
*/
967+
mskput: typeof mskput;
968+
935969
/**
936970
* Returns a new array by applying a mask to a provided input array.
937971
*
@@ -1129,6 +1163,38 @@ interface Namespace {
11291163
*/
11301164
onesLike: typeof onesLike;
11311165

1166+
/**
1167+
* Replaces elements of an array with provided values according to a provided mask array.
1168+
*
1169+
* @param x - input array
1170+
* @param mask - mask array
1171+
* @param values - values to set
1172+
* @param options - function options
1173+
* @returns input array
1174+
*
1175+
* @example
1176+
* var x = [ 1, 2, 3, 4 ];
1177+
*
1178+
* var mask = [ 0, 1, 1, 0 ];
1179+
* var values = [ 20, 30 ];
1180+
*
1181+
* var out = ns.place( x, mask, values );
1182+
* // returns [ 1, 20, 30, 4 ]
1183+
*
1184+
* var bool = ( out === x );
1185+
* // returns true
1186+
*
1187+
* @example
1188+
* var x = [ 1, 2, 3, 4 ];
1189+
*
1190+
* var out = ns.place( x, [ 0, 1, 1, 0 ], [ 30 ] );
1191+
* // returns [ 1, 30, 30, 4 ]
1192+
*
1193+
* var bool = ( out === x );
1194+
* // returns true
1195+
*/
1196+
place: typeof place;
1197+
11321198
/**
11331199
* Returns an uninitialized typed array.
11341200
*

0 commit comments

Comments
 (0)