From a38b003c08c6edfbb78fc247dc4f7a39f4c1b520 Mon Sep 17 00:00:00 2001 From: gururaj1512 Date: Wed, 23 Sep 2026 16:36:09 +0530 Subject: [PATCH] feat: add float16 dtype support to array/base/assert/* --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../base/assert/has-equal-values-indexed/docs/types/test.ts | 2 ++ .../array/base/assert/has-equal-values/docs/types/test.ts | 2 ++ .../array/base/assert/has-same-values/docs/types/test.ts | 2 ++ .../base/assert/is-boolean-data-type/benchmark/benchmark.js | 1 + .../@stdlib/array/base/assert/is-boolean-data-type/test/test.js | 1 + .../@stdlib/array/base/assert/is-booleanarray/test/test.js | 2 ++ .../@stdlib/array/base/assert/is-complex128array/test/test.js | 2 ++ .../@stdlib/array/base/assert/is-complex64array/test/test.js | 2 ++ .../base/assert/is-integer-data-type/benchmark/benchmark.js | 1 + .../@stdlib/array/base/assert/is-integer-data-type/test/test.js | 1 + .../base/assert/is-numeric-data-type/benchmark/benchmark.js | 1 + .../@stdlib/array/base/assert/is-numeric-data-type/test/test.js | 1 + .../array/base/assert/is-real-data-type/benchmark/benchmark.js | 1 + .../@stdlib/array/base/assert/is-real-data-type/test/test.js | 1 + .../is-real-floating-point-data-type/benchmark/benchmark.js | 1 + .../base/assert/is-real-floating-point-data-type/test/test.js | 1 + .../assert/is-signed-integer-data-type/benchmark/benchmark.js | 1 + .../array/base/assert/is-signed-integer-data-type/test/test.js | 1 + .../assert/is-unsigned-integer-data-type/benchmark/benchmark.js | 1 + .../base/assert/is-unsigned-integer-data-type/test/test.js | 1 + 20 files changed, 26 insertions(+) diff --git a/lib/node_modules/@stdlib/array/base/assert/has-equal-values-indexed/docs/types/test.ts b/lib/node_modules/@stdlib/array/base/assert/has-equal-values-indexed/docs/types/test.ts index abe20a1edfc8..b4d6c79d022d 100644 --- a/lib/node_modules/@stdlib/array/base/assert/has-equal-values-indexed/docs/types/test.ts +++ b/lib/node_modules/@stdlib/array/base/assert/has-equal-values-indexed/docs/types/test.ts @@ -16,6 +16,7 @@ * limitations under the License. */ +import Float16Array = require( '@stdlib/array/float16' ); import hasEqualValuesIndexed = require( './index' ); @@ -28,6 +29,7 @@ import hasEqualValuesIndexed = require( './index' ); hasEqualValuesIndexed( x, x ); // $ExpectType boolean hasEqualValuesIndexed( new Float64Array( x ), new Float64Array( x ) ); // $ExpectType boolean hasEqualValuesIndexed( new Float32Array( x ), new Float32Array( x ) ); // $ExpectType boolean + hasEqualValuesIndexed( new Float16Array( x ), new Float16Array( x ) ); // $ExpectType boolean hasEqualValuesIndexed( new Int32Array( x ), new Int32Array( x ) ); // $ExpectType boolean hasEqualValuesIndexed( new Int16Array( x ), new Int16Array( x ) ); // $ExpectType boolean hasEqualValuesIndexed( new Int8Array( x ), new Int8Array( x ) ); // $ExpectType boolean diff --git a/lib/node_modules/@stdlib/array/base/assert/has-equal-values/docs/types/test.ts b/lib/node_modules/@stdlib/array/base/assert/has-equal-values/docs/types/test.ts index b2447e8ebe2d..57594eda3490 100644 --- a/lib/node_modules/@stdlib/array/base/assert/has-equal-values/docs/types/test.ts +++ b/lib/node_modules/@stdlib/array/base/assert/has-equal-values/docs/types/test.ts @@ -16,6 +16,7 @@ * limitations under the License. */ +import Float16Array = require( '@stdlib/array/float16' ); import toAccessorArray = require( '@stdlib/array/base/to-accessor-array' ); import hasEqualValues = require( './index' ); @@ -29,6 +30,7 @@ import hasEqualValues = require( './index' ); hasEqualValues( x, x ); // $ExpectType boolean hasEqualValues( new Float64Array( x ), new Float64Array( x ) ); // $ExpectType boolean hasEqualValues( new Float32Array( x ), new Float32Array( x ) ); // $ExpectType boolean + hasEqualValues( new Float16Array( x ), new Float16Array( x ) ); // $ExpectType boolean hasEqualValues( new Int32Array( x ), new Int32Array( x ) ); // $ExpectType boolean hasEqualValues( new Int16Array( x ), new Int16Array( x ) ); // $ExpectType boolean hasEqualValues( new Int8Array( x ), new Int8Array( x ) ); // $ExpectType boolean diff --git a/lib/node_modules/@stdlib/array/base/assert/has-same-values/docs/types/test.ts b/lib/node_modules/@stdlib/array/base/assert/has-same-values/docs/types/test.ts index 37608e6cde3d..303d8344026c 100644 --- a/lib/node_modules/@stdlib/array/base/assert/has-same-values/docs/types/test.ts +++ b/lib/node_modules/@stdlib/array/base/assert/has-same-values/docs/types/test.ts @@ -16,6 +16,7 @@ * limitations under the License. */ +import Float16Array = require( '@stdlib/array/float16' ); import toAccessorArray = require( '@stdlib/array/base/to-accessor-array' ); import hasSameValues = require( './index' ); @@ -29,6 +30,7 @@ import hasSameValues = require( './index' ); hasSameValues( x, x ); // $ExpectType boolean hasSameValues( new Float64Array( x ), new Float64Array( x ) ); // $ExpectType boolean hasSameValues( new Float32Array( x ), new Float32Array( x ) ); // $ExpectType boolean + hasSameValues( new Float16Array( x ), new Float16Array( x ) ); // $ExpectType boolean hasSameValues( new Int32Array( x ), new Int32Array( x ) ); // $ExpectType boolean hasSameValues( new Int16Array( x ), new Int16Array( x ) ); // $ExpectType boolean hasSameValues( new Int8Array( x ), new Int8Array( x ) ); // $ExpectType boolean diff --git a/lib/node_modules/@stdlib/array/base/assert/is-boolean-data-type/benchmark/benchmark.js b/lib/node_modules/@stdlib/array/base/assert/is-boolean-data-type/benchmark/benchmark.js index 4334247541de..16d83c75cd5b 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-boolean-data-type/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-boolean-data-type/benchmark/benchmark.js @@ -39,6 +39,7 @@ bench( pkg, function benchmark( b ) { 'bool', 'complex128', 'complex64', + 'float16', 'float32', 'float64', 'generic', diff --git a/lib/node_modules/@stdlib/array/base/assert/is-boolean-data-type/test/test.js b/lib/node_modules/@stdlib/array/base/assert/is-boolean-data-type/test/test.js index 0efbbf8ab293..5476a528b5c4 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-boolean-data-type/test/test.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-boolean-data-type/test/test.js @@ -56,6 +56,7 @@ tape( 'the function returns `false` if not provided a supported array boolean da // Supported dtypes: 'complex128', 'complex64', + 'float16', 'float32', 'float64', 'uint16', diff --git a/lib/node_modules/@stdlib/array/base/assert/is-booleanarray/test/test.js b/lib/node_modules/@stdlib/array/base/assert/is-booleanarray/test/test.js index 354842075353..ea07d6d88916 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-booleanarray/test/test.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-booleanarray/test/test.js @@ -30,6 +30,7 @@ var Uint16Array = require( '@stdlib/array/uint16' ); var Int32Array = require( '@stdlib/array/int32' ); var Uint32Array = require( '@stdlib/array/uint32' ); var Float32Array = require( '@stdlib/array/float32' ); +var Float16Array = require( '@stdlib/array/float16' ); var Float64Array = require( '@stdlib/array/float64' ); var Complex128Array = require( '@stdlib/array/complex128' ); var Complex64Array = require( '@stdlib/array/complex64' ); @@ -73,6 +74,7 @@ tape( 'the function returns `false` if not provided a BooleanArray', function te { 'length': 10 }, // eslint-disable-line object-curly-newline new Float64Array( 10 ), new Float32Array( 10 ), + new Float16Array( 10 ), new Int32Array( 10 ), new Uint32Array( 10 ), new Int16Array( 10 ), diff --git a/lib/node_modules/@stdlib/array/base/assert/is-complex128array/test/test.js b/lib/node_modules/@stdlib/array/base/assert/is-complex128array/test/test.js index a635cf08de4a..1e976414fea6 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-complex128array/test/test.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-complex128array/test/test.js @@ -30,6 +30,7 @@ var Uint16Array = require( '@stdlib/array/uint16' ); var Int32Array = require( '@stdlib/array/int32' ); var Uint32Array = require( '@stdlib/array/uint32' ); var Float32Array = require( '@stdlib/array/float32' ); +var Float16Array = require( '@stdlib/array/float16' ); var Float64Array = require( '@stdlib/array/float64' ); var Complex128Array = require( '@stdlib/array/complex128' ); var Complex64Array = require( '@stdlib/array/complex64' ); @@ -72,6 +73,7 @@ tape( 'the function returns `false` if not provided a Complex128Array', function { 'length': 10 }, // eslint-disable-line object-curly-newline new Float64Array( 10 ), new Float32Array( 10 ), + new Float16Array( 10 ), new Int32Array( 10 ), new Uint32Array( 10 ), new Int16Array( 10 ), diff --git a/lib/node_modules/@stdlib/array/base/assert/is-complex64array/test/test.js b/lib/node_modules/@stdlib/array/base/assert/is-complex64array/test/test.js index 573e1c6d9117..a77d86c66260 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-complex64array/test/test.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-complex64array/test/test.js @@ -30,6 +30,7 @@ var Uint16Array = require( '@stdlib/array/uint16' ); var Int32Array = require( '@stdlib/array/int32' ); var Uint32Array = require( '@stdlib/array/uint32' ); var Float32Array = require( '@stdlib/array/float32' ); +var Float16Array = require( '@stdlib/array/float16' ); var Float64Array = require( '@stdlib/array/float64' ); var Complex128Array = require( '@stdlib/array/complex128' ); var Complex64Array = require( '@stdlib/array/complex64' ); @@ -72,6 +73,7 @@ tape( 'the function returns `false` if not provided a Complex64Array', function { 'length': 10 }, // eslint-disable-line object-curly-newline new Float64Array( 10 ), new Float32Array( 10 ), + new Float16Array( 10 ), new Int32Array( 10 ), new Uint32Array( 10 ), new Int16Array( 10 ), diff --git a/lib/node_modules/@stdlib/array/base/assert/is-integer-data-type/benchmark/benchmark.js b/lib/node_modules/@stdlib/array/base/assert/is-integer-data-type/benchmark/benchmark.js index af4e32633075..7c6fc3070b72 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-integer-data-type/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-integer-data-type/benchmark/benchmark.js @@ -36,6 +36,7 @@ bench( pkg, function benchmark( b ) { values = [ 'binary', + 'float16', 'float32', 'float64', 'generic', diff --git a/lib/node_modules/@stdlib/array/base/assert/is-integer-data-type/test/test.js b/lib/node_modules/@stdlib/array/base/assert/is-integer-data-type/test/test.js index f4271359f024..f7bd355b7f34 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-integer-data-type/test/test.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-integer-data-type/test/test.js @@ -62,6 +62,7 @@ tape( 'the function returns `false` if not provided a supported array integer da // Supported dtypes: 'complex64', 'complex128', + 'float16', 'float32', 'float64', 'generic', diff --git a/lib/node_modules/@stdlib/array/base/assert/is-numeric-data-type/benchmark/benchmark.js b/lib/node_modules/@stdlib/array/base/assert/is-numeric-data-type/benchmark/benchmark.js index e5d2320ab966..76c7fa014e2e 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-numeric-data-type/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-numeric-data-type/benchmark/benchmark.js @@ -36,6 +36,7 @@ bench( pkg, function benchmark( b ) { values = [ 'binary', + 'float16', 'float32', 'float64', 'generic', diff --git a/lib/node_modules/@stdlib/array/base/assert/is-numeric-data-type/test/test.js b/lib/node_modules/@stdlib/array/base/assert/is-numeric-data-type/test/test.js index 69f10c18d6c9..8c77751b4d90 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-numeric-data-type/test/test.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-numeric-data-type/test/test.js @@ -40,6 +40,7 @@ tape( 'the function returns `true` if provided a supported array numeric data ty values = [ 'complex64', 'complex128', + 'float16', 'float32', 'float64', 'uint16', diff --git a/lib/node_modules/@stdlib/array/base/assert/is-real-data-type/benchmark/benchmark.js b/lib/node_modules/@stdlib/array/base/assert/is-real-data-type/benchmark/benchmark.js index bef07db26ab8..d4e1e56a7ec2 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-real-data-type/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-real-data-type/benchmark/benchmark.js @@ -36,6 +36,7 @@ bench( pkg, function benchmark( b ) { values = [ 'binary', + 'float16', 'float32', 'float64', 'generic', diff --git a/lib/node_modules/@stdlib/array/base/assert/is-real-data-type/test/test.js b/lib/node_modules/@stdlib/array/base/assert/is-real-data-type/test/test.js index b3a8432c6c46..37d2e5578c8b 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-real-data-type/test/test.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-real-data-type/test/test.js @@ -38,6 +38,7 @@ tape( 'the function returns `true` if provided a supported array real-valued dat var i; values = [ + 'float16', 'float32', 'float64', 'uint16', diff --git a/lib/node_modules/@stdlib/array/base/assert/is-real-floating-point-data-type/benchmark/benchmark.js b/lib/node_modules/@stdlib/array/base/assert/is-real-floating-point-data-type/benchmark/benchmark.js index a2b41ea7a72c..856108423000 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-real-floating-point-data-type/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-real-floating-point-data-type/benchmark/benchmark.js @@ -36,6 +36,7 @@ bench( pkg, function benchmark( b ) { values = [ 'binary', + 'float16', 'float32', 'float64', 'generic', diff --git a/lib/node_modules/@stdlib/array/base/assert/is-real-floating-point-data-type/test/test.js b/lib/node_modules/@stdlib/array/base/assert/is-real-floating-point-data-type/test/test.js index 20e447d1806f..7174d98bf220 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-real-floating-point-data-type/test/test.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-real-floating-point-data-type/test/test.js @@ -38,6 +38,7 @@ tape( 'the function returns `true` if provided a supported array real-valued flo var i; values = [ + 'float16', 'float32', 'float64' ]; diff --git a/lib/node_modules/@stdlib/array/base/assert/is-signed-integer-data-type/benchmark/benchmark.js b/lib/node_modules/@stdlib/array/base/assert/is-signed-integer-data-type/benchmark/benchmark.js index 4daff2aa4a2a..d15519851ea6 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-signed-integer-data-type/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-signed-integer-data-type/benchmark/benchmark.js @@ -36,6 +36,7 @@ bench( pkg, function benchmark( b ) { values = [ 'binary', + 'float16', 'float32', 'float64', 'generic', diff --git a/lib/node_modules/@stdlib/array/base/assert/is-signed-integer-data-type/test/test.js b/lib/node_modules/@stdlib/array/base/assert/is-signed-integer-data-type/test/test.js index 03f219579217..7a2f43ebf97a 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-signed-integer-data-type/test/test.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-signed-integer-data-type/test/test.js @@ -58,6 +58,7 @@ tape( 'the function returns `false` if not provided a supported array signed int // Supported dtypes: 'complex64', 'complex128', + 'float16', 'float32', 'float64', 'generic', diff --git a/lib/node_modules/@stdlib/array/base/assert/is-unsigned-integer-data-type/benchmark/benchmark.js b/lib/node_modules/@stdlib/array/base/assert/is-unsigned-integer-data-type/benchmark/benchmark.js index 100660c09c02..d51ae134ff31 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-unsigned-integer-data-type/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-unsigned-integer-data-type/benchmark/benchmark.js @@ -36,6 +36,7 @@ bench( pkg, function benchmark( b ) { values = [ 'binary', + 'float16', 'float32', 'float64', 'generic', diff --git a/lib/node_modules/@stdlib/array/base/assert/is-unsigned-integer-data-type/test/test.js b/lib/node_modules/@stdlib/array/base/assert/is-unsigned-integer-data-type/test/test.js index 2d37fd4be7e3..f237167c91a0 100644 --- a/lib/node_modules/@stdlib/array/base/assert/is-unsigned-integer-data-type/test/test.js +++ b/lib/node_modules/@stdlib/array/base/assert/is-unsigned-integer-data-type/test/test.js @@ -59,6 +59,7 @@ tape( 'the function returns `false` if not provided a supported array unsigned i // Supported dtypes: 'complex64', 'complex128', + 'float16', 'float32', 'float64', 'generic',