From a8221361187e3c04bb3b9dec96b6d16ce0900de9 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 21 Jun 2024 18:46:43 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 2 ++ docs/types/index.d.ts | 66 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3155a354..7239b06a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ ##### Features +- [`bd678e5`](https://github.com/stdlib-js/stdlib/commit/bd678e56ad259f1424590d1e1ce213dc038cc676) - update namespace TypeScript declarations [(#2425)](https://github.com/stdlib-js/stdlib/pull/2425) - [`0b727a5`](https://github.com/stdlib-js/stdlib/commit/0b727a5d922225d23693e456b5f7b5b82f63750a) - add `mskput` to namespace - [`82a217c`](https://github.com/stdlib-js/stdlib/commit/82a217c79f7c10d4aca129fbaba753ce5055115a) - add `place` to namespace - [`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
+- [`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)_ - [`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)_ - [`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)_ - [`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)_ diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index 8210f097..2758ba02 100644 --- a/docs/types/index.d.ts +++ b/docs/types/index.d.ts @@ -56,6 +56,7 @@ import logspace = require( './../../logspace' ); import minDataType = require( './../../min-dtype' ); import mostlySafeCasts = require( './../../mostly-safe-casts' ); import mskfilter = require( './../../mskfilter' ); +import mskput = require( './../../mskput' ); import mskreject = require( './../../mskreject' ); import nans = require( './../../nans' ); import nansLike = require( './../../nans-like' ); @@ -64,6 +65,7 @@ import oneTo = require( './../../one-to' ); import oneToLike = require( './../../one-to-like' ); import ones = require( './../../ones' ); import onesLike = require( './../../ones-like' ); +import place = require( './../../place' ); import typedarraypool = require( './../../pool' ); import promotionRules = require( './../../promotion-rules' ); import put = require( './../../put' ); @@ -932,6 +934,38 @@ interface Namespace { */ mskfilter: typeof mskfilter; + /** + * Replaces elements of an array with provided values according to a provided mask array. + * + * @param x - input array + * @param mask - mask array + * @param values - values to set + * @param options - function options + * @returns input array + * + * @example + * var x = [ 1, 2, 3, 4 ]; + * + * var mask = [ 1, 0, 0, 1 ]; + * var values = [ 20, 30 ]; + * + * var out = ns.mskput( x, mask, values ); + * // returns [ 1, 20, 30, 4 ] + * + * var bool = ( out === x ); + * // returns true + * + * @example + * var x = [ 1, 2, 3, 4 ]; + * + * var out = ns.mskput( x, [ 1, 0, 0, 1 ], [ 30 ] ); + * // returns [ 1, 30, 30, 4 ] + * + * var bool = ( out === x ); + * // returns true + */ + mskput: typeof mskput; + /** * Returns a new array by applying a mask to a provided input array. * @@ -1129,6 +1163,38 @@ interface Namespace { */ onesLike: typeof onesLike; + /** + * Replaces elements of an array with provided values according to a provided mask array. + * + * @param x - input array + * @param mask - mask array + * @param values - values to set + * @param options - function options + * @returns input array + * + * @example + * var x = [ 1, 2, 3, 4 ]; + * + * var mask = [ 0, 1, 1, 0 ]; + * var values = [ 20, 30 ]; + * + * var out = ns.place( x, mask, values ); + * // returns [ 1, 20, 30, 4 ] + * + * var bool = ( out === x ); + * // returns true + * + * @example + * var x = [ 1, 2, 3, 4 ]; + * + * var out = ns.place( x, [ 0, 1, 1, 0 ], [ 30 ] ); + * // returns [ 1, 30, 30, 4 ] + * + * var bool = ( out === x ); + * // returns true + */ + place: typeof place; + /** * Returns an uninitialized typed array. *