Skip to content

Commit b2f6c57

Browse files
committed
Auto-generated commit
1 parent 7aac8bc commit b2f6c57

File tree

9 files changed

+55
-8
lines changed

9 files changed

+55
-8
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,28 @@
187187

188188
<!-- /.package -->
189189

190+
<section class="package" id="ndarray-defaults-unreleased">
191+
192+
#### [@stdlib/ndarray/defaults](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/defaults)
193+
194+
<details>
195+
196+
<section class="features">
197+
198+
##### Features
199+
200+
- [`e92152b`](https://github.com/stdlib-js/stdlib/commit/e92152baba61ab358640cba9d0506d75123a5f60) - add boolean dtype support to `ndarray/defaults` [(#2551)](https://github.com/stdlib-js/stdlib/pull/2551)
201+
202+
</section>
203+
204+
<!-- /.features -->
205+
206+
</details>
207+
208+
</section>
209+
210+
<!-- /.package -->
211+
190212
<section class="package" id="ndarray-dtypes-unreleased">
191213

192214
#### [@stdlib/ndarray/dtypes](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/dtypes)
@@ -441,6 +463,7 @@ A total of 3 people contributed to this release. Thank you to the following cont
441463

442464
<details>
443465

466+
- [`e92152b`](https://github.com/stdlib-js/stdlib/commit/e92152baba61ab358640cba9d0506d75123a5f60) - **feat:** add boolean dtype support to `ndarray/defaults` [(#2551)](https://github.com/stdlib-js/stdlib/pull/2551) _(by Jaysukh Makvana, Athan Reines)_
444467
- [`16e0808`](https://github.com/stdlib-js/stdlib/commit/16e0808004b7bd4f16eea7eced5229ee1120b577) - **feat:** add boolean dtype support to `ndarray/dtypes` [(#2550)](https://github.com/stdlib-js/stdlib/pull/2550) _(by Jaysukh Makvana, Athan Reines)_
445468
- [`21052a2`](https://github.com/stdlib-js/stdlib/commit/21052a211289b86b0e8a2e1f43a4d4c5b2379ffb) - **feat:** add boolean dtype support to `ndarray/min-dtype` [(#2552)](https://github.com/stdlib-js/stdlib/pull/2552) _(by Jaysukh Makvana, Athan Reines)_
446469
- [`efecd32`](https://github.com/stdlib-js/stdlib/commit/efecd32448520402335cdf8fdb34ee88b96556b9) - **feat:** add boolean dtype support to `ndarray/base/buffer-dtype` [(#2572)](https://github.com/stdlib-js/stdlib/pull/2572) _(by Jaysukh Makvana, Athan Reines)_

defaults/README.md

Lines changed: 6 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) 2023 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.
@@ -62,6 +62,7 @@ The returned object has the following properties:
6262
- **integer**: default integer data type.
6363
- **signed_integer**: default signed integer data type.
6464
- **unsigned_integer**: default unsigned integer data type.
65+
- **boolean**: default boolean data type.
6566

6667
- **order**: default memory layout.
6768

@@ -139,6 +140,10 @@ console.log( x.dtype );
139140
opts.dtype = o.dtypes.unsigned_integer;
140141
x = array( buf, opts );
141142
console.log( x.dtype );
143+
144+
opts.dtype = o.dtypes.boolean;
145+
x = array( buf, opts );
146+
console.log( x.dtype );
142147
```
143148

144149
</section>

defaults/docs/repl.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
out.dtypes.unsigned_integer: string
3838
Default unsigned integer data type.
3939

40+
out.dtypes.boolean: string
41+
Default boolean data type.
42+
4043
out.order: string
4144
Default memory layout.
4245

defaults/docs/types/index.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2023 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.
@@ -66,6 +66,11 @@ interface DataTypes {
6666
* Default unsigned integer data type.
6767
*/
6868
unsigned_integer: 'uint32';
69+
70+
/**
71+
* Default boolean value data type.
72+
*/
73+
boolean: 'bool';
6974
}
7075

7176
/**

defaults/examples/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2023 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.
@@ -53,3 +53,7 @@ console.log( x.dtype );
5353
opts.dtype = o.dtypes.unsigned_integer;
5454
x = array( buf, opts );
5555
console.log( x.dtype );
56+
57+
opts.dtype = o.dtypes.boolean;
58+
x = array( buf, opts );
59+
console.log( x.dtype );

defaults/lib/get.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2023 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.
@@ -36,6 +36,7 @@ var HASH = {
3636
'dtypes.integer': DEFAULTS.dtypes.integer,
3737
'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,
3838
'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer,
39+
'dtypes.boolean': DEFAULTS.dtypes.boolean,
3940
'order': DEFAULTS.order,
4041
'casting': DEFAULTS.casting,
4142
'index_mode': DEFAULTS.index_mode

defaults/lib/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2023 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.
@@ -41,7 +41,8 @@ function defaults() {
4141
'complex_floating_point': 'complex128',
4242
'integer': 'int32',
4343
'signed_integer': 'int32',
44-
'unsigned_integer': 'uint32'
44+
'unsigned_integer': 'uint32',
45+
'boolean': 'bool'
4546
},
4647

4748
// Memory layout:

defaults/test/test.get.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2023 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.
@@ -54,6 +54,7 @@ tape( 'if provided a recognized setting, the function returns a default value',
5454
'dtypes.integer',
5555
'dtypes.signed_integer',
5656
'dtypes.unsigned_integer',
57+
'dtypes.boolean',
5758

5859
'casting',
5960
'order',
@@ -69,6 +70,7 @@ tape( 'if provided a recognized setting, the function returns a default value',
6970
DEFAULTS.dtypes.integer,
7071
DEFAULTS.dtypes.signed_integer,
7172
DEFAULTS.dtypes.unsigned_integer,
73+
DEFAULTS.dtypes.boolean,
7274

7375
DEFAULTS.casting,
7476
DEFAULTS.order,

defaults/test/test.main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2023 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.
@@ -66,6 +66,9 @@ tape( 'the function returns default ndarray settings', function test( t ) {
6666
t.strictEqual( hasOwnProp( o.dtypes, 'unsigned_integer' ), true, 'has property' );
6767
t.strictEqual( typeof o.dtypes.unsigned_integer, 'string', 'returns expected value' );
6868

69+
t.strictEqual( hasOwnProp( o.dtypes, 'boolean' ), true, 'has property' );
70+
t.strictEqual( typeof o.dtypes.boolean, 'string', 'returns expected value' );
71+
6972
t.strictEqual( hasOwnProp( o, 'order' ), true, 'has property' );
7073
t.strictEqual( typeof o.order, 'string', 'returns expected value' );
7174

0 commit comments

Comments
 (0)