Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jul 13, 2024
1 parent 7aac8bc commit b2f6c57
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 8 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,28 @@

<!-- /.package -->

<section class="package" id="ndarray-defaults-unreleased">

#### [@stdlib/ndarray/defaults](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/defaults)

<details>

<section class="features">

##### Features

- [`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)

</section>

<!-- /.features -->

</details>

</section>

<!-- /.package -->

<section class="package" id="ndarray-dtypes-unreleased">

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

<details>

- [`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)_
- [`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)_
- [`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)_
- [`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)_
Expand Down
7 changes: 6 additions & 1 deletion defaults/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@license Apache-2.0
Copyright (c) 2023 The Stdlib Authors.
Copyright (c) 2024 The Stdlib Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -62,6 +62,7 @@ The returned object has the following properties:
- **integer**: default integer data type.
- **signed_integer**: default signed integer data type.
- **unsigned_integer**: default unsigned integer data type.
- **boolean**: default boolean data type.

- **order**: default memory layout.

Expand Down Expand Up @@ -139,6 +140,10 @@ console.log( x.dtype );
opts.dtype = o.dtypes.unsigned_integer;
x = array( buf, opts );
console.log( x.dtype );

opts.dtype = o.dtypes.boolean;
x = array( buf, opts );
console.log( x.dtype );
```

</section>
Expand Down
3 changes: 3 additions & 0 deletions defaults/docs/repl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
out.dtypes.unsigned_integer: string
Default unsigned integer data type.

out.dtypes.boolean: string
Default boolean data type.

out.order: string
Default memory layout.

Expand Down
7 changes: 6 additions & 1 deletion defaults/docs/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @license Apache-2.0
*
* Copyright (c) 2023 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -66,6 +66,11 @@ interface DataTypes {
* Default unsigned integer data type.
*/
unsigned_integer: 'uint32';

/**
* Default boolean value data type.
*/
boolean: 'bool';
}

/**
Expand Down
6 changes: 5 additions & 1 deletion defaults/examples/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2023 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -53,3 +53,7 @@ console.log( x.dtype );
opts.dtype = o.dtypes.unsigned_integer;
x = array( buf, opts );
console.log( x.dtype );

opts.dtype = o.dtypes.boolean;
x = array( buf, opts );
console.log( x.dtype );
3 changes: 2 additions & 1 deletion defaults/lib/get.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2023 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,6 +36,7 @@ var HASH = {
'dtypes.integer': DEFAULTS.dtypes.integer,
'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,
'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer,
'dtypes.boolean': DEFAULTS.dtypes.boolean,
'order': DEFAULTS.order,
'casting': DEFAULTS.casting,
'index_mode': DEFAULTS.index_mode
Expand Down
5 changes: 3 additions & 2 deletions defaults/lib/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2023 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -41,7 +41,8 @@ function defaults() {
'complex_floating_point': 'complex128',
'integer': 'int32',
'signed_integer': 'int32',
'unsigned_integer': 'uint32'
'unsigned_integer': 'uint32',
'boolean': 'bool'
},

// Memory layout:
Expand Down
4 changes: 3 additions & 1 deletion defaults/test/test.get.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2023 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -54,6 +54,7 @@ tape( 'if provided a recognized setting, the function returns a default value',
'dtypes.integer',
'dtypes.signed_integer',
'dtypes.unsigned_integer',
'dtypes.boolean',

'casting',
'order',
Expand All @@ -69,6 +70,7 @@ tape( 'if provided a recognized setting, the function returns a default value',
DEFAULTS.dtypes.integer,
DEFAULTS.dtypes.signed_integer,
DEFAULTS.dtypes.unsigned_integer,
DEFAULTS.dtypes.boolean,

DEFAULTS.casting,
DEFAULTS.order,
Expand Down
5 changes: 4 additions & 1 deletion defaults/test/test.main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2023 The Stdlib Authors.
* Copyright (c) 2024 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -66,6 +66,9 @@ tape( 'the function returns default ndarray settings', function test( t ) {
t.strictEqual( hasOwnProp( o.dtypes, 'unsigned_integer' ), true, 'has property' );
t.strictEqual( typeof o.dtypes.unsigned_integer, 'string', 'returns expected value' );

t.strictEqual( hasOwnProp( o.dtypes, 'boolean' ), true, 'has property' );
t.strictEqual( typeof o.dtypes.boolean, 'string', 'returns expected value' );

t.strictEqual( hasOwnProp( o, 'order' ), true, 'has property' );
t.strictEqual( typeof o.order, 'string', 'returns expected value' );

Expand Down

0 comments on commit b2f6c57

Please sign in to comment.