Skip to content

Commit 71f7e11

Browse files
committed
Auto-generated commit
1 parent 0aa2167 commit 71f7e11

File tree

6 files changed

+52
-9
lines changed

6 files changed

+52
-9
lines changed

CHANGELOG.md

+23
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,28 @@ This release closes the following issue:
10771077

10781078
<!-- /.package -->
10791079

1080+
<section class="package" id="array-dtype-unreleased">
1081+
1082+
#### [@stdlib/array/dtype](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/dtype)
1083+
1084+
<details>
1085+
1086+
<section class="features">
1087+
1088+
##### Features
1089+
1090+
- [`26681a0`](https://github.com/stdlib-js/stdlib/commit/26681a00adf94037d357eaebf842af2c454b06e3) - add boolean dtype support in `array/dtype` [(#2306)](https://github.com/stdlib-js/stdlib/pull/2306)
1091+
1092+
</section>
1093+
1094+
<!-- /.features -->
1095+
1096+
</details>
1097+
1098+
</section>
1099+
1100+
<!-- /.package -->
1101+
10801102
<section class="package" id="array-dtypes-unreleased">
10811103

10821104
#### [@stdlib/array/dtypes](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/dtypes)
@@ -1680,6 +1702,7 @@ A total of 13 people contributed to this release. Thank you to the following con
16801702

16811703
<details>
16821704

1705+
- [`26681a0`](https://github.com/stdlib-js/stdlib/commit/26681a00adf94037d357eaebf842af2c454b06e3) - **feat:** add boolean dtype support in `array/dtype` [(#2306)](https://github.com/stdlib-js/stdlib/pull/2306) _(by Jaysukh Makvana, Athan Reines)_
16831706
- [`1510858`](https://github.com/stdlib-js/stdlib/commit/1510858faac58b25a8c5e398ffe54545526acfe6) - **feat:** add boolean dtype support in `array/ctors` [(#2308)](https://github.com/stdlib-js/stdlib/pull/2308) _(by Jaysukh Makvana)_
16841707
- [`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)_
16851708
- [`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)_

dtype/docs/types/index.d.ts

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2021 The Stdlib Authors.
4+
* Copyright (c) 2024 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { RealOrComplexTypedArray, Complex128Array, Complex64Array, DataType } from '@stdlib/types/array';
23+
import { RealOrComplexTypedArray, Complex128Array, Complex64Array, BooleanArray, DataType } from '@stdlib/types/array';
2424

2525
/**
2626
* Returns the data type of an array.
@@ -78,6 +78,20 @@ declare function dtype( value: Complex128Array ): 'complex128';
7878
*/
7979
declare function dtype( value: Complex64Array ): 'complex64';
8080

81+
/**
82+
* Returns the data type of an array.
83+
*
84+
* @param value - input value
85+
* @returns data type
86+
*
87+
* @example
88+
* var BooleanArray = require( '@stdlib/array/bool' );
89+
*
90+
* var dt = dtype( new BooleanArray( [ true, false, true, false ] ) );
91+
* // returns 'bool'
92+
*/
93+
declare function dtype( value: BooleanArray ): 'bool';
94+
8195
/**
8296
* Returns the data type of an array.
8397
*

dtype/docs/types/test.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2021 The Stdlib Authors.
4+
* Copyright (c) 2024 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@
1818

1919
import Complex128Array = require( './../../../complex128' );
2020
import Complex64Array = require( './../../../complex64' );
21+
import BooleanArray = require( './../../../bool' );
2122
import dtype = require( './index' );
2223

2324

@@ -36,6 +37,7 @@ import dtype = require( './index' );
3637
dtype( new Uint16Array( 10 ) ); // $ExpectType "uint16"
3738
dtype( new Uint8Array( 10 ) ); // $ExpectType "uint8"
3839
dtype( new Uint8ClampedArray( 10 ) ); // $ExpectType "uint8c"
40+
dtype( new BooleanArray( 10 ) ); // $ExpectType "bool"
3941
dtype( [] ); // $ExpectType "generic"
4042
}
4143

dtype/lib/ctor2dtype.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2018 The Stdlib Authors.
4+
* Copyright (c) 2024 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -33,7 +33,8 @@ var ctor2dtypes = {
3333
'Uint8Array': 'uint8',
3434
'Uint8ClampedArray': 'uint8c',
3535
'Complex64Array': 'complex64',
36-
'Complex128Array': 'complex128'
36+
'Complex128Array': 'complex128',
37+
'BooleanArray': 'bool'
3738
};
3839

3940

dtype/lib/ctors.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2018 The Stdlib Authors.
4+
* Copyright (c) 2024 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@ var Uint8ClampedArray = require( './../../uint8c' );
3131
var Int8Array = require( './../../int8' );
3232
var Complex64Array = require( './../../complex64' );
3333
var Complex128Array = require( './../../complex128' );
34+
var BooleanArray = require( './../../bool' );
3435

3536

3637
// MAIN //
@@ -47,7 +48,8 @@ var CTORS = [
4748
Uint8Array,
4849
Uint8ClampedArray,
4950
Complex64Array,
50-
Complex128Array
51+
Complex128Array,
52+
BooleanArray
5153
];
5254

5355

dtype/lib/dtypes.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2018 The Stdlib Authors.
4+
* Copyright (c) 2024 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -32,7 +32,8 @@ var DTYPES = [
3232
'uint8',
3333
'uint8c',
3434
'complex64',
35-
'complex128'
35+
'complex128',
36+
'bool'
3637
];
3738

3839

0 commit comments

Comments
 (0)