File tree Expand file tree Collapse file tree 7 files changed +49
-5
lines changed Expand file tree Collapse file tree 7 files changed +49
-5
lines changed Original file line number Diff line number Diff line change @@ -1033,6 +1033,28 @@ This release closes the following issue:
1033
1033
1034
1034
<!-- /.package -->
1035
1035
1036
+ <section class =" package " id =" array-ctors-unreleased " >
1037
+
1038
+ #### [ @stdlib/array /ctors] ( https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/ctors )
1039
+
1040
+ <details >
1041
+
1042
+ <section class =" features " >
1043
+
1044
+ ##### Features
1045
+
1046
+ - [ ` 1510858 ` ] ( https://github.com/stdlib-js/stdlib/commit/1510858faac58b25a8c5e398ffe54545526acfe6 ) - add boolean dtype support in ` array/ctors ` [ (#2308 )] ( https://github.com/stdlib-js/stdlib/pull/2308 )
1047
+
1048
+ </section >
1049
+
1050
+ <!-- /.features -->
1051
+
1052
+ </details >
1053
+
1054
+ </section >
1055
+
1056
+ <!-- /.package -->
1057
+
1036
1058
<section class =" package " id =" array-defaults-unreleased " >
1037
1059
1038
1060
#### [ @stdlib/array /defaults] ( https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/defaults )
@@ -1658,6 +1680,7 @@ A total of 13 people contributed to this release. Thank you to the following con
1658
1680
1659
1681
<details >
1660
1682
1683
+ - [ ` 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)_
1661
1684
- [ ` 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)_
1662
1685
- [ ` 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)_
1663
1686
- [ ` 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)_
Original file line number Diff line number Diff line change 2
2
3
3
@license Apache-2.0
4
4
5
- Copyright (c) 2018 The Stdlib Authors.
5
+ Copyright (c) 2024 The Stdlib Authors.
6
6
7
7
Licensed under the Apache License, Version 2.0 (the "License");
8
8
you may not use this file except in compliance with the License.
@@ -55,6 +55,7 @@ The function returns constructors for the following data types:
55
55
- ` float64 ` : double-precision floating-point numbers.
56
56
- ` complex64 ` : single-precision complex floating-point numbers.
57
57
- ` complex128 ` : double-precision complex floating-point numbers.
58
+ - ` bool ` : boolean values.
58
59
- ` generic ` : values of any type.
59
60
- ` int16 ` : signed 16-bit integers.
60
61
- ` int32 ` : signed 32-bit integers.
Original file line number Diff line number Diff line change 8
8
- float64: double-precision floating-point numbers.
9
9
- complex64: single-precision complex floating-point numbers.
10
10
- complex128: double-precision complex floating-point numbers.
11
+ - bool: boolean values.
11
12
- generic: values of any type.
12
13
- int16: signed 16-bit integers.
13
14
- int32: signed 32-bit integers.
Original file line number Diff line number Diff line change 20
20
21
21
import Complex128Array = require( './../../../complex128' ) ;
22
22
import Complex64Array = require( './../../../complex64' ) ;
23
+ import BooleanArray = require( './../../../bool' ) ;
23
24
24
25
/**
25
26
* Returns a `Float64Array` constructor.
@@ -69,6 +70,18 @@ declare function ctors( dtype: 'complex128' ): typeof Complex128Array;
69
70
*/
70
71
declare function ctors ( dtype : 'complex64' ) : typeof Complex64Array ;
71
72
73
+ /**
74
+ * Returns a `BooleanArray` constructor.
75
+ *
76
+ * @param dtype - data type
77
+ * @returns constructor
78
+ *
79
+ * @example
80
+ * var ctor = ctors( 'bool' );
81
+ * // returns <Function>
82
+ */
83
+ declare function ctors ( dtype : 'bool' ) : typeof BooleanArray ;
84
+
72
85
/**
73
86
* Returns an `Int32Array` constructor.
74
87
*
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import ctors = require( './index' );
27
27
ctors ( 'float32' ) ; // $ExpectType Float32ArrayConstructor
28
28
ctors ( 'complex128' ) ; // $ExpectType Complex128ArrayConstructor
29
29
ctors ( 'complex64' ) ; // $ExpectType Complex64ArrayConstructor
30
+ ctors ( 'bool' ) ; // $ExpectType BooleanArrayConstructor
30
31
ctors ( 'int32' ) ; // $ExpectType Int32ArrayConstructor
31
32
ctors ( 'int16' ) ; // $ExpectType Int16ArrayConstructor
32
33
ctors ( 'int8' ) ; // $ExpectType Int8ArrayConstructor
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ var Uint8Array = require( './../../uint8' );
31
31
var Uint8ClampedArray = require ( './../../uint8c' ) ;
32
32
var Complex64Array = require ( './../../complex64' ) ;
33
33
var Complex128Array = require ( './../../complex128' ) ;
34
+ var BooleanArray = require ( './../../bool' ) ;
34
35
35
36
36
37
// MAIN //
@@ -48,7 +49,8 @@ var ctors = {
48
49
'uint8' : Uint8Array ,
49
50
'uint8c' : Uint8ClampedArray ,
50
51
'complex64' : Complex64Array ,
51
- 'complex128' : Complex128Array
52
+ 'complex128' : Complex128Array ,
53
+ 'bool' : BooleanArray
52
54
} ;
53
55
54
56
Original file line number Diff line number Diff line change 1
1
/**
2
2
* @license Apache-2.0
3
3
*
4
- * Copyright (c) 2018 The Stdlib Authors.
4
+ * Copyright (c) 2024 The Stdlib Authors.
5
5
*
6
6
* Licensed under the Apache License, Version 2.0 (the "License");
7
7
* you may not use this file except in compliance with the License.
@@ -33,6 +33,7 @@ var Uint8Array = require( './../../uint8' );
33
33
var Uint8ClampedArray = require ( './../../uint8c' ) ;
34
34
var Complex64Array = require ( './../../complex64' ) ;
35
35
var Complex128Array = require ( './../../complex128' ) ;
36
+ var BooleanArray = require ( './../../bool' ) ;
36
37
var isFunction = require ( '@stdlib/assert/is-function' ) ;
37
38
var ctors = require ( './../lib' ) ;
38
39
@@ -63,7 +64,8 @@ tape( 'the function returns array constructors', function test( t ) {
63
64
'uint8' ,
64
65
'uint8c' ,
65
66
'complex64' ,
66
- 'complex128'
67
+ 'complex128' ,
68
+ 'bool'
67
69
] ;
68
70
expected = [
69
71
Float64Array ,
@@ -77,7 +79,8 @@ tape( 'the function returns array constructors', function test( t ) {
77
79
Uint8Array ,
78
80
Uint8ClampedArray ,
79
81
Complex64Array ,
80
- Complex128Array
82
+ Complex128Array ,
83
+ BooleanArray
81
84
] ;
82
85
for ( i = 0 ; i < dtypes . length ; i ++ ) {
83
86
ctor = ctors ( dtypes [ i ] ) ;
You can’t perform that action at this time.
0 commit comments