Skip to content

Commit d0bfe93

Browse files
committed
Auto-generated commit
1 parent 1675169 commit d0bfe93

49 files changed

Lines changed: 12412 additions & 41 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CHANGELOG.md‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@
44

55
<section class="release" id="unreleased">
66

7-
## Unreleased (2026-06-23)
7+
## Unreleased (2026-06-24)
88

99
<section class="features">
1010

1111
### Features
1212

13+
- [`dc9a2a7`](https://github.com/stdlib-js/stdlib/commit/dc9a2a7eb4962f9743ba7a7369a6593669370296) - add `ndarray/matrix/ctor`
14+
- [`585603b`](https://github.com/stdlib-js/stdlib/commit/585603b45bb17f82056940bd0cf3dca981a20fbb) - add support for `Float16Array`
15+
- [`c9a4e5c`](https://github.com/stdlib-js/stdlib/commit/c9a4e5ce4cfa693bb66df02c8182e003a88f9b20) - add `isGenericDataType`
16+
- [`d4323d4`](https://github.com/stdlib-js/stdlib/commit/d4323d42b1e6509b6fc8fd2cbb44117f1011b1aa) - add `ndarray/base/assert/is-generic-data-type`
17+
- [`34da35d`](https://github.com/stdlib-js/stdlib/commit/34da35d9674e4dcf02465949fd39eaf4b3a342e3) - add `isBinaryDataType` to namespace
18+
- [`3b85408`](https://github.com/stdlib-js/stdlib/commit/3b85408231a00d40ac90c05c971ce83576e65ba0) - add `ndarray/base/assert/is-binary-data-type`
1319
- [`e98a2a0`](https://github.com/stdlib-js/stdlib/commit/e98a2a0ffd29fe7da7a95ac18b4a1e519464fde0) - update `ndarray/base` TypeScript declarations [(#12688)](https://github.com/stdlib-js/stdlib/pull/12688)
1420
- [`c016f87`](https://github.com/stdlib-js/stdlib/commit/c016f877831218b06cb925732a4f33612b58d5f8) - add `assignDiagonal` to namespace
1521
- [`b186702`](https://github.com/stdlib-js/stdlib/commit/b186702222b3b2cd2039d886b62ce78bd2f6af3b) - add `ndarray/base/assign-diagonal` [(#11993)](https://github.com/stdlib-js/stdlib/pull/11993)
@@ -41,6 +47,18 @@
4147

4248
<details>
4349

50+
- [`dc9a2a7`](https://github.com/stdlib-js/stdlib/commit/dc9a2a7eb4962f9743ba7a7369a6593669370296) - **feat:** add `ndarray/matrix/ctor` _(by Athan Reines)_
51+
- [`29b2bde`](https://github.com/stdlib-js/stdlib/commit/29b2bded9ac858b970a2866f20000ae39681e602) - **bench:** measure a subset of dtypes _(by Athan Reines)_
52+
- [`585603b`](https://github.com/stdlib-js/stdlib/commit/585603b45bb17f82056940bd0cf3dca981a20fbb) - **feat:** add support for `Float16Array` _(by Athan Reines)_
53+
- [`f021c70`](https://github.com/stdlib-js/stdlib/commit/f021c7064415469b10f226ff7a9bd612786d8eff) - **docs:** update notes _(by Athan Reines)_
54+
- [`7a4fa8e`](https://github.com/stdlib-js/stdlib/commit/7a4fa8e8e7031325ae3efdcd6f4d1f427bf1df6b) - **docs:** add notes _(by Athan Reines)_
55+
- [`c148ba7`](https://github.com/stdlib-js/stdlib/commit/c148ba73d3d68a71a4b1dc5b358030459fe9388b) - **refactor:** use assertion utilities and add FIXME _(by Athan Reines)_
56+
- [`c68f1d9`](https://github.com/stdlib-js/stdlib/commit/c68f1d9fca11a9040ecc51e1c1d05ffa11da3b61) - **docs:** fix default option value _(by Athan Reines)_
57+
- [`c9a4e5c`](https://github.com/stdlib-js/stdlib/commit/c9a4e5ce4cfa693bb66df02c8182e003a88f9b20) - **feat:** add `isGenericDataType` _(by Athan Reines)_
58+
- [`d4323d4`](https://github.com/stdlib-js/stdlib/commit/d4323d42b1e6509b6fc8fd2cbb44117f1011b1aa) - **feat:** add `ndarray/base/assert/is-generic-data-type` _(by Athan Reines)_
59+
- [`34da35d`](https://github.com/stdlib-js/stdlib/commit/34da35d9674e4dcf02465949fd39eaf4b3a342e3) - **feat:** add `isBinaryDataType` to namespace _(by Athan Reines)_
60+
- [`3b85408`](https://github.com/stdlib-js/stdlib/commit/3b85408231a00d40ac90c05c971ce83576e65ba0) - **feat:** add `ndarray/base/assert/is-binary-data-type` _(by Athan Reines)_
61+
- [`efdecd0`](https://github.com/stdlib-js/stdlib/commit/efdecd0ca3e6e8a31c0dfe5ee18a91b6d64abd73) - **refactor:** use base array utilities _(by Athan Reines)_
4462
- [`4b3d572`](https://github.com/stdlib-js/stdlib/commit/4b3d572dc99bb18ada036a472deca6c0429d9dfb) - **docs:** update example [(#13061)](https://github.com/stdlib-js/stdlib/pull/13061) _(by Philipp Burckhardt, Athan Reines)_
4563
- [`953b185`](https://github.com/stdlib-js/stdlib/commit/953b185c676ade1db334df956325b67006b2a996) - **docs:** fix example _(by Athan Reines)_
4664
- [`a0740ff`](https://github.com/stdlib-js/stdlib/commit/a0740ff717285ec77bca66efa3133061321184e3) - **docs:** update related packages sections [(#13007)](https://github.com/stdlib-js/stdlib/pull/13007) _(by stdlib-bot)_
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
<!--
2+
3+
@license Apache-2.0
4+
5+
Copyright (c) 2026 The Stdlib Authors.
6+
7+
Licensed under the Apache License, Version 2.0 (the "License");
8+
you may not use this file except in compliance with the License.
9+
You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
21+
# isBinaryDataType
22+
23+
> Test if an input value is a supported ndarray binary [data type][@stdlib/ndarray/dtypes].
24+
25+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
26+
27+
<section class="intro">
28+
29+
</section>
30+
31+
<!-- /.intro -->
32+
33+
<!-- Package usage documentation. -->
34+
35+
<section class="usage">
36+
37+
## Usage
38+
39+
```javascript
40+
var isBinaryDataType = require( '@stdlib/ndarray/base/assert/is-binary-data-type' );
41+
```
42+
43+
#### isBinaryDataType( value )
44+
45+
Tests if an input value is a supported ndarray binary [data type][@stdlib/ndarray/dtypes].
46+
47+
```javascript
48+
var bool = isBinaryDataType( 'binary' );
49+
// returns true
50+
51+
bool = isBinaryDataType( 'uint32' );
52+
// returns false
53+
```
54+
55+
</section>
56+
57+
<!-- /.usage -->
58+
59+
<!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
60+
61+
<section class="notes">
62+
63+
</section>
64+
65+
<!-- /.notes -->
66+
67+
<!-- Package usage examples. -->
68+
69+
<section class="examples">
70+
71+
## Examples
72+
73+
<!-- eslint no-undef: "error" -->
74+
75+
```javascript
76+
var isBinaryDataType = require( '@stdlib/ndarray/base/assert/is-binary-data-type' );
77+
78+
var bool = isBinaryDataType( 'binary' );
79+
// returns true
80+
81+
bool = isBinaryDataType( 'bool' );
82+
// returns false
83+
84+
bool = isBinaryDataType( 'float32' );
85+
// returns false
86+
87+
bool = isBinaryDataType( 'float64' );
88+
// returns false
89+
90+
bool = isBinaryDataType( 'generic' );
91+
// returns false
92+
93+
bool = isBinaryDataType( 'int16' );
94+
// returns false
95+
96+
bool = isBinaryDataType( 'int32' );
97+
// returns false
98+
99+
bool = isBinaryDataType( 'int8' );
100+
// returns false
101+
102+
bool = isBinaryDataType( 'uint16' );
103+
// returns false
104+
105+
bool = isBinaryDataType( 'uint32' );
106+
// returns false
107+
108+
bool = isBinaryDataType( 'uint8' );
109+
// returns false
110+
111+
bool = isBinaryDataType( 'uint8c' );
112+
// returns false
113+
114+
bool = isBinaryDataType( '' );
115+
// returns false
116+
117+
bool = isBinaryDataType( 'foo' );
118+
// returns false
119+
```
120+
121+
</section>
122+
123+
<!-- /.examples -->
124+
125+
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
126+
127+
<section class="references">
128+
129+
</section>
130+
131+
<!-- /.references -->
132+
133+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
134+
135+
<section class="related">
136+
137+
</section>
138+
139+
<!-- /.related -->
140+
141+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
142+
143+
<section class="links">
144+
145+
[@stdlib/ndarray/dtypes]: https://github.com/stdlib-js/ndarray/tree/main/dtypes
146+
147+
</section>
148+
149+
<!-- /.links -->
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2026 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var bench = require( '@stdlib/bench' );
24+
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
25+
var pkg = require( './../package.json' ).name;
26+
var isBinaryDataType = require( './../lib' );
27+
28+
29+
// MAIN //
30+
31+
bench( pkg, function benchmark( b ) {
32+
var values;
33+
var out;
34+
var v;
35+
var i;
36+
37+
values = [
38+
'binary',
39+
'bool',
40+
'complex64',
41+
'complex128',
42+
'float32',
43+
'float64',
44+
'generic',
45+
'int16',
46+
'int32',
47+
'int8',
48+
'uint16',
49+
'uint32',
50+
'uint8',
51+
'uint8c',
52+
'foo',
53+
'bar',
54+
'',
55+
'beep',
56+
'boop'
57+
];
58+
59+
b.tic();
60+
for ( i = 0; i < b.iterations; i++ ) {
61+
v = values[ i%values.length ];
62+
out = isBinaryDataType( v );
63+
if ( typeof out !== 'boolean' ) {
64+
b.fail( 'should return a boolean' );
65+
}
66+
}
67+
b.toc();
68+
if ( !isBoolean( out ) ) {
69+
b.fail( 'should return a boolean' );
70+
}
71+
b.pass( 'benchmark finished' );
72+
b.end();
73+
});
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
{{alias}}( value )
3+
Tests if an input value is a supported ndarray binary data type.
4+
5+
Parameters
6+
----------
7+
value: any
8+
Value to test.
9+
10+
Returns
11+
-------
12+
bool: boolean
13+
Boolean indicating if an input value is a supported ndarray binary
14+
data type.
15+
16+
Examples
17+
--------
18+
> var bool = {{alias}}( 'binary' )
19+
true
20+
> bool = {{alias}}( 'bool' )
21+
false
22+
> bool = {{alias}}( 'float32' )
23+
false
24+
> bool = {{alias}}( 'float64' )
25+
false
26+
> bool = {{alias}}( 'int16' )
27+
false
28+
> bool = {{alias}}( 'int32' )
29+
false
30+
> bool = {{alias}}( 'int8' )
31+
false
32+
> bool = {{alias}}( 'uint16' )
33+
false
34+
> bool = {{alias}}( 'uint32' )
35+
false
36+
> bool = {{alias}}( 'uint8' )
37+
false
38+
> bool = {{alias}}( 'uint8c' )
39+
false
40+
> bool = {{alias}}( '' )
41+
false
42+
> bool = {{alias}}( 'beep' )
43+
false
44+
45+
See Also
46+
--------
47+
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2026 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
// TypeScript Version: 4.1
20+
21+
/**
22+
* Tests whether an input value is a supported ndarray binary data type.
23+
*
24+
* @param v - value to test
25+
* @returns boolean indicating whether an input value is a supported ndarray binary data type
26+
*
27+
* @example
28+
* var bool = isBinaryDataType( 'binary' );
29+
* // returns true
30+
*
31+
* bool = isBinaryDataType( 'bool' );
32+
* // returns false
33+
*
34+
* bool = isBinaryDataType( 'float32' );
35+
* // returns false
36+
*
37+
* bool = isBinaryDataType( 'float64' );
38+
* // returns false
39+
*
40+
* bool = isBinaryDataType( 'generic' );
41+
* // returns false
42+
*
43+
* bool = isBinaryDataType( 'int16' );
44+
* // returns false
45+
*
46+
* bool = isBinaryDataType( 'int32' );
47+
* // returns false
48+
*
49+
* bool = isBinaryDataType( 'int8' );
50+
* // returns false
51+
*
52+
* bool = isBinaryDataType( 'uint16' );
53+
* // returns false
54+
*
55+
* bool = isBinaryDataType( 'uint32' );
56+
* // returns false
57+
*
58+
* bool = isBinaryDataType( 'uint8' );
59+
* // returns false
60+
*
61+
* bool = isBinaryDataType( 'uint8c' );
62+
* // returns false
63+
*
64+
* bool = isBinaryDataType( 'foo' );
65+
* // returns false
66+
*/
67+
declare function isBinaryDataType( v: any ): boolean;
68+
69+
70+
// EXPORTS //
71+
72+
export = isBinaryDataType;

0 commit comments

Comments
 (0)