diff --git a/lib/node_modules/@stdlib/array/dtypes/README.md b/lib/node_modules/@stdlib/array/dtypes/README.md index 1d933ed4cccb..c810e6d003d1 100644 --- a/lib/node_modules/@stdlib/array/dtypes/README.md +++ b/lib/node_modules/@stdlib/array/dtypes/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2018 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. @@ -55,6 +55,7 @@ When not provided a data type "kind", the function returns an array containing t - `float64`: double-precision floating-point numbers. - `complex64`: single-precision complex floating-point numbers. - `complex128`: double-precision complex floating-point numbers. +- `bool`: boolean values. - `generic`: values of any type. - `int16`: signed 16-bit integers. - `int32`: signed 32-bit integers. @@ -76,6 +77,7 @@ The function supports the following data type kinds: - `floating_point`: floating-point data types. - `real_floating_point`: real-valued floating-point data types. - `complex_floating_point`: complex-valued floating-point data types. +- `boolean`: boolean data types. - `integer`: integer data types. - `signed_integer`: signed integer data types. - `unsigned_integer`: unsigned integer data types. diff --git a/lib/node_modules/@stdlib/array/dtypes/benchmark/benchmark.js b/lib/node_modules/@stdlib/array/dtypes/benchmark/benchmark.js index d4868aed5bb7..3c7886c541ee 100644 --- a/lib/node_modules/@stdlib/array/dtypes/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/array/dtypes/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 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. @@ -79,7 +79,8 @@ bench( pkg+'::kind,generic', function benchmark( b ) { values = [ 'floating_point_and_generic', - 'integer_and_generic' + 'integer_and_generic', + 'boolean_and_generic' ]; b.tic(); diff --git a/lib/node_modules/@stdlib/array/dtypes/docs/repl.txt b/lib/node_modules/@stdlib/array/dtypes/docs/repl.txt index 45f76dd23d6f..3f70e26da247 100644 --- a/lib/node_modules/@stdlib/array/dtypes/docs/repl.txt +++ b/lib/node_modules/@stdlib/array/dtypes/docs/repl.txt @@ -9,6 +9,7 @@ - float64: double-precision floating-point numbers. - complex64: single-precision complex floating-point numbers. - complex128: double-precision complex floating-point numbers. + - bool: boolean values. - generic: values of any type. - int16: signed 16-bit integers. - int32: signed 32-bit integers. @@ -23,6 +24,7 @@ - floating_point: floating-point data types. - real_floating_point: real-valued floating-point data types. - complex_floating_point: complex-valued floating-point data types. + - boolean: boolean data types. - integer: integer data types. - signed_integer: signed integer data types. - unsigned_integer: unsigned integer data types. diff --git a/lib/node_modules/@stdlib/array/dtypes/lib/dtypes.json b/lib/node_modules/@stdlib/array/dtypes/lib/dtypes.json index 659a47ca28a3..47194825c89e 100644 --- a/lib/node_modules/@stdlib/array/dtypes/lib/dtypes.json +++ b/lib/node_modules/@stdlib/array/dtypes/lib/dtypes.json @@ -1,5 +1,6 @@ { "all": [ + "bool", "complex64", "complex128", "float32", @@ -14,6 +15,7 @@ "uint8c" ], "typed": [ + "bool", "complex64", "complex128", "float32", @@ -40,6 +42,9 @@ "complex64", "complex128" ], + "boolean": [ + "bool" + ], "integer": [ "int16", "int32", diff --git a/lib/node_modules/@stdlib/array/dtypes/lib/index.js b/lib/node_modules/@stdlib/array/dtypes/lib/index.js index bf389a0efc92..eb466770e99d 100644 --- a/lib/node_modules/@stdlib/array/dtypes/lib/index.js +++ b/lib/node_modules/@stdlib/array/dtypes/lib/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 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. @@ -27,7 +27,7 @@ * var dtypes = require( '@stdlib/array/dtypes' ); * * var list = dtypes(); -* // e.g., returns [ 'float32', 'float64', 'generic', 'int16', 'int32', 'int8', 'uint16', 'uint32', 'uint8', 'uint8c', 'complex128', 'complex64' ] +* // e.g., returns [ 'float32', 'float64', 'generic', 'int16', 'int32', 'int8', 'uint16', 'uint32', 'uint8', 'uint8c', 'complex128', 'complex64', 'bool' ] */ // MODULES // diff --git a/lib/node_modules/@stdlib/array/dtypes/test/test.js b/lib/node_modules/@stdlib/array/dtypes/test/test.js index 9779d7086f98..5f947ce7505f 100644 --- a/lib/node_modules/@stdlib/array/dtypes/test/test.js +++ b/lib/node_modules/@stdlib/array/dtypes/test/test.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 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. @@ -37,6 +37,7 @@ tape( 'the function returns a list of array data types', function test( t ) { var actual; expected = [ + 'bool', 'complex64', 'complex128', 'float32', @@ -61,6 +62,7 @@ tape( 'the function supports returning a list of array data types (all)', functi var actual; expected = [ + 'bool', 'complex64', 'complex128', 'float32', @@ -85,6 +87,7 @@ tape( 'the function supports returning a list of array data types (all, includin var actual; expected = [ + 'bool', 'complex64', 'complex128', 'float32', @@ -109,6 +112,7 @@ tape( 'the function supports returning a list of array data types (typed)', func var actual; expected = [ + 'bool', 'complex64', 'complex128', 'float32', @@ -132,6 +136,7 @@ tape( 'the function supports returning a list of array data types (typed, includ var actual; expected = [ + 'bool', 'complex64', 'complex128', 'float32', @@ -242,6 +247,33 @@ tape( 'the function supports returning a list of complex-valued floating-point a t.end(); }); +tape( 'the function supports returning a list of boolean array data types', function test( t ) { + var expected; + var actual; + + expected = [ + 'bool' + ]; + actual = dtypes( 'boolean' ); + + t.deepEqual( actual, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports returning a list of boolean array data types (including "generic")', function test( t ) { + var expected; + var actual; + + expected = [ + 'bool', + 'generic' + ]; + actual = dtypes( 'boolean_and_generic' ); + + t.deepEqual( actual, expected, 'returns expected value' ); + t.end(); +}); + tape( 'the function supports returning a list of integer array data types', function test( t ) { var expected; var actual;