From 81302c5b9e6c2e42da97868907e4807d5fa7bbcd Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Thu, 6 Jun 2024 20:07:49 +0000 Subject: [PATCH] Auto-generated commit --- CHANGELOG.md | 23 +++++++++++++++++++++++ defaults/README.md | 1 + defaults/docs/repl.txt | 3 +++ defaults/docs/types/index.d.ts | 5 +++++ defaults/lib/get.js | 3 ++- defaults/lib/main.js | 3 ++- defaults/test/test.get.js | 4 +++- defaults/test/test.main.js | 3 +++ 8 files changed, 42 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d79ccdb9..10af832f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1033,6 +1033,28 @@ This release closes the following issue: +
+ +#### [@stdlib/array/defaults](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/defaults) + +
+ +
+ +##### Features + +- [`50e2775`](https://github.com/stdlib-js/stdlib/commit/50e2775cfb5128c0e66cdc755ca459ac416c3481) - add boolean dtype support in `array/defaults` [(#2309)](https://github.com/stdlib-js/stdlib/pull/2309) + +
+ + + +
+ +
+ + +
#### [@stdlib/array/dtypes](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/dtypes) @@ -1636,6 +1658,7 @@ A total of 13 people contributed to this release. Thank you to the following con
+- [`50e2775`](https://github.com/stdlib-js/stdlib/commit/50e2775cfb5128c0e66cdc755ca459ac416c3481) - **feat:** add boolean dtype support in `array/defaults` [(#2309)](https://github.com/stdlib-js/stdlib/pull/2309) _(by Jaysukh Makvana, Athan Reines)_ - [`31f2c1a`](https://github.com/stdlib-js/stdlib/commit/31f2c1a8c77a86aac05815d89f158febe8a37611) - **feat:** add boolean dtype support in `array/mostly-safe-casts` [(#2310)](https://github.com/stdlib-js/stdlib/pull/2310) _(by Jaysukh Makvana, Athan Reines)_ - [`40da309`](https://github.com/stdlib-js/stdlib/commit/40da3097c6ffaed4cd9284d6cdeff8bf11786553) - **feat:** add `map` method to `array/bool` [(#2292)](https://github.com/stdlib-js/stdlib/pull/2292) _(by Jaysukh Makvana, Athan Reines)_ - [`3edcfe5`](https://github.com/stdlib-js/stdlib/commit/3edcfe5d814fd12a56dbe492ddc78663721f5acd) - **feat:** update namespace TypeScript declarations [(#2303)](https://github.com/stdlib-js/stdlib/pull/2303) _(by stdlib-bot, Athan Reines)_ diff --git a/defaults/README.md b/defaults/README.md index 83877b92..e006ccd3 100644 --- a/defaults/README.md +++ b/defaults/README.md @@ -59,6 +59,7 @@ The returned object has the following properties: - **floating_point**: default floating-point data type. - **real_floating_point**: default real-valued floating-point data type. - **complex_floating_point**: default complex-valued floating-point data type. + - **boolean**: default boolean data type. - **integer**: default integer data type. - **signed_integer**: default signed integer data type. - **unsigned_integer**: default unsigned integer data type. diff --git a/defaults/docs/repl.txt b/defaults/docs/repl.txt index 9942f9bd..bf15bf40 100644 --- a/defaults/docs/repl.txt +++ b/defaults/docs/repl.txt @@ -28,6 +28,9 @@ out.dtypes.complex_floating_point: string Default complex-valued floating-point data type. + out.dtypes.boolean: string + Default boolean data type. + out.dtypes.integer: string Default integer data type. diff --git a/defaults/docs/types/index.d.ts b/defaults/docs/types/index.d.ts index 7bbf39d4..e7563a65 100644 --- a/defaults/docs/types/index.d.ts +++ b/defaults/docs/types/index.d.ts @@ -52,6 +52,11 @@ interface DataTypes { */ complex_floating_point: 'complex128'; + /** + * Default boolean data type. + */ + boolean: 'bool'; + /** * Default integer data type. */ diff --git a/defaults/lib/get.js b/defaults/lib/get.js index 6835abe7..8d871a96 100644 --- a/defaults/lib/get.js +++ b/defaults/lib/get.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +33,7 @@ var HASH = { 'dtypes.floating_point': DEFAULTS.dtypes.floating_point, 'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point, 'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point, + 'dtypes.boolean': DEFAULTS.dtypes.boolean, 'dtypes.integer': DEFAULTS.dtypes.integer, 'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer, 'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer diff --git a/defaults/lib/main.js b/defaults/lib/main.js index 5ee959f4..99b717aa 100644 --- a/defaults/lib/main.js +++ b/defaults/lib/main.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,6 +39,7 @@ function defaults() { 'floating_point': 'float64', 'real_floating_point': 'float64', 'complex_floating_point': 'complex128', + 'boolean': 'bool', 'integer': 'int32', 'signed_integer': 'int32', 'unsigned_integer': 'uint32' diff --git a/defaults/test/test.get.js b/defaults/test/test.get.js index 7c7f6a78..1f127df8 100644 --- a/defaults/test/test.get.js +++ b/defaults/test/test.get.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,6 +51,7 @@ tape( 'if provided a recognized setting, the function returns a default value', 'dtypes.floating_point', 'dtypes.real_floating_point', 'dtypes.complex_floating_point', + 'dtypes.boolean', 'dtypes.integer', 'dtypes.signed_integer', 'dtypes.unsigned_integer' @@ -62,6 +63,7 @@ tape( 'if provided a recognized setting, the function returns a default value', DEFAULTS.dtypes.floating_point, DEFAULTS.dtypes.real_floating_point, DEFAULTS.dtypes.complex_floating_point, + DEFAULTS.dtypes.boolean, DEFAULTS.dtypes.integer, DEFAULTS.dtypes.signed_integer, DEFAULTS.dtypes.unsigned_integer diff --git a/defaults/test/test.main.js b/defaults/test/test.main.js index 6d49be0f..24f6c318 100644 --- a/defaults/test/test.main.js +++ b/defaults/test/test.main.js @@ -57,6 +57,9 @@ tape( 'the function returns default settings', function test( t ) { t.strictEqual( hasOwnProp( o.dtypes, 'complex_floating_point' ), true, 'has property' ); t.strictEqual( typeof o.dtypes.complex_floating_point, 'string', 'returns expected value' ); + t.strictEqual( hasOwnProp( o.dtypes, 'boolean' ), true, 'has property' ); + t.strictEqual( typeof o.dtypes.boolean, 'string', 'returns expected value' ); + t.strictEqual( hasOwnProp( o.dtypes, 'integer' ), true, 'has property' ); t.strictEqual( typeof o.dtypes.integer, 'string', 'returns expected value' );