Skip to content

Commit 0aa2167

Browse files
committed
Auto-generated commit
1 parent 81302c5 commit 0aa2167

File tree

7 files changed

+49
-5
lines changed

7 files changed

+49
-5
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,28 @@ This release closes the following issue:
10331033

10341034
<!-- /.package -->
10351035

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+
10361058
<section class="package" id="array-defaults-unreleased">
10371059

10381060
#### [@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
16581680

16591681
<details>
16601682

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)_
16611684
- [`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)_
16621685
- [`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)_
16631686
- [`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)_

ctors/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
@license Apache-2.0
44
5-
Copyright (c) 2018 The Stdlib Authors.
5+
Copyright (c) 2024 The Stdlib Authors.
66
77
Licensed under the Apache License, Version 2.0 (the "License");
88
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:
5555
- `float64`: double-precision floating-point numbers.
5656
- `complex64`: single-precision complex floating-point numbers.
5757
- `complex128`: double-precision complex floating-point numbers.
58+
- `bool`: boolean values.
5859
- `generic`: values of any type.
5960
- `int16`: signed 16-bit integers.
6061
- `int32`: signed 32-bit integers.

ctors/docs/repl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- float64: double-precision floating-point numbers.
99
- complex64: single-precision complex floating-point numbers.
1010
- complex128: double-precision complex floating-point numbers.
11+
- bool: boolean values.
1112
- generic: values of any type.
1213
- int16: signed 16-bit integers.
1314
- int32: signed 32-bit integers.

ctors/docs/types/index.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import Complex128Array = require( './../../../complex128' );
2222
import Complex64Array = require( './../../../complex64' );
23+
import BooleanArray = require( './../../../bool' );
2324

2425
/**
2526
* Returns a `Float64Array` constructor.
@@ -69,6 +70,18 @@ declare function ctors( dtype: 'complex128' ): typeof Complex128Array;
6970
*/
7071
declare function ctors( dtype: 'complex64' ): typeof Complex64Array;
7172

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+
7285
/**
7386
* Returns an `Int32Array` constructor.
7487
*

ctors/docs/types/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import ctors = require( './index' );
2727
ctors( 'float32' ); // $ExpectType Float32ArrayConstructor
2828
ctors( 'complex128' ); // $ExpectType Complex128ArrayConstructor
2929
ctors( 'complex64' ); // $ExpectType Complex64ArrayConstructor
30+
ctors( 'bool' ); // $ExpectType BooleanArrayConstructor
3031
ctors( 'int32' ); // $ExpectType Int32ArrayConstructor
3132
ctors( 'int16' ); // $ExpectType Int16ArrayConstructor
3233
ctors( 'int8' ); // $ExpectType Int8ArrayConstructor

ctors/lib/ctors.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ var Uint8Array = require( './../../uint8' );
3131
var Uint8ClampedArray = require( './../../uint8c' );
3232
var Complex64Array = require( './../../complex64' );
3333
var Complex128Array = require( './../../complex128' );
34+
var BooleanArray = require( './../../bool' );
3435

3536

3637
// MAIN //
@@ -48,7 +49,8 @@ var ctors = {
4849
'uint8': Uint8Array,
4950
'uint8c': Uint8ClampedArray,
5051
'complex64': Complex64Array,
51-
'complex128': Complex128Array
52+
'complex128': Complex128Array,
53+
'bool': BooleanArray
5254
};
5355

5456

ctors/test/test.js

Lines changed: 6 additions & 3 deletions
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,6 +33,7 @@ var Uint8Array = require( './../../uint8' );
3333
var Uint8ClampedArray = require( './../../uint8c' );
3434
var Complex64Array = require( './../../complex64' );
3535
var Complex128Array = require( './../../complex128' );
36+
var BooleanArray = require( './../../bool' );
3637
var isFunction = require( '@stdlib/assert/is-function' );
3738
var ctors = require( './../lib' );
3839

@@ -63,7 +64,8 @@ tape( 'the function returns array constructors', function test( t ) {
6364
'uint8',
6465
'uint8c',
6566
'complex64',
66-
'complex128'
67+
'complex128',
68+
'bool'
6769
];
6870
expected = [
6971
Float64Array,
@@ -77,7 +79,8 @@ tape( 'the function returns array constructors', function test( t ) {
7779
Uint8Array,
7880
Uint8ClampedArray,
7981
Complex64Array,
80-
Complex128Array
82+
Complex128Array,
83+
BooleanArray
8184
];
8285
for ( i = 0; i < dtypes.length; i++ ) {
8386
ctor = ctors( dtypes[ i ] );

0 commit comments

Comments
 (0)