Skip to content

Commit 393418d

Browse files
committed
Auto-generated commit
1 parent 8e5e720 commit 393418d

File tree

13 files changed

+43
-67
lines changed

13 files changed

+43
-67
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ A total of 3 people contributed to this release. Thank you to the following cont
286286

287287
<details>
288288

289+
- [`41a5c49`](https://github.com/stdlib-js/stdlib/commit/41a5c4954cc46899abfe20145987627b2e86fc94) - **test:** update tests in `ndarray/base/*` to support boolean dtypes [(#2505)](https://github.com/stdlib-js/stdlib/pull/2505) _(by Jaysukh Makvana, Athan Reines)_
289290
- [`ca687d6`](https://github.com/stdlib-js/stdlib/commit/ca687d6a8d8476309630c5a03f303c2420dc753f) - **feat:** add boolean dtype support to `ndarray/safe-casts` [(#2507)](https://github.com/stdlib-js/stdlib/pull/2507) _(by Jaysukh Makvana, Athan Reines)_
290291
- [`b8bd516`](https://github.com/stdlib-js/stdlib/commit/b8bd51687cabdda74299cb37b9a5527fddd35aaa) - **feat:** update namespace TypeScript declarations [(##2351)](#2351) _(by stdlib-bot, Philipp Burckhardt)_
291292
- [`539fc72`](https://github.com/stdlib-js/stdlib/commit/539fc725d1fea6738862de98e3f3c6385fbdc0e6) - **style:** fix indentation _(by Athan Reines)_

base/char2dtype/README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,7 @@ var out = char2dtype();
9090
var dtypeChar = require( '@stdlib/ndarray/base/dtype-char' );
9191
var char2dtype = require( '@stdlib/ndarray/base/char2dtype' );
9292

93-
var chars;
94-
var out;
95-
var i;
96-
97-
chars = [
93+
var chars = [
9894
dtypeChar( 'float64' ),
9995
dtypeChar( 'float32' ),
10096
dtypeChar( 'int8' ),
@@ -109,9 +105,9 @@ chars = [
109105
'('
110106
];
111107

108+
var i;
112109
for ( i = 0; i < chars.length; i++ ) {
113-
out = char2dtype( chars[ i ] );
114-
console.log( '%s => %s', chars[ i ], out );
110+
console.log( '%s => %s', chars[ i ], char2dtype( chars[ i ] ) );
115111
}
116112
```
117113

base/char2dtype/examples/index.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@
2121
var dtypeChar = require( './../../../base/dtype-char' );
2222
var char2dtype = require( './../lib' );
2323

24-
var chars;
25-
var out;
26-
var i;
27-
28-
chars = [
24+
var chars = [
2925
dtypeChar( 'float64' ),
3026
dtypeChar( 'float32' ),
3127
dtypeChar( 'int8' ),
@@ -40,7 +36,7 @@ chars = [
4036
'('
4137
];
4238

39+
var i;
4340
for ( i = 0; i < chars.length; i++ ) {
44-
out = char2dtype( chars[ i ] );
45-
console.log( '%s => %s', chars[ i ], out );
41+
console.log( '%s => %s', chars[ i ], char2dtype( chars[ i ] ) );
4642
}

base/char2dtype/test/test.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) 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.
@@ -61,7 +61,8 @@ tape( 'the function returns the data type string associated with a provided sing
6161
'binary',
6262
'generic',
6363
'complex64',
64-
'complex128'
64+
'complex128',
65+
'bool'
6566
];
6667
for ( i = 0; i < expected.length; i++ ) {
6768
ch = dtypeChar( expected[ i ] );

base/dtype-char/README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,7 @@ var obj = dtypeChar();
8989
```javascript
9090
var dtypeChar = require( '@stdlib/ndarray/base/dtype-char' );
9191

92-
var dtypes;
93-
var ch;
94-
var i;
95-
96-
dtypes = [
92+
var dtypes = [
9793
'float64',
9894
'float32',
9995
'int8',
@@ -108,9 +104,9 @@ dtypes = [
108104
'foobar'
109105
];
110106

107+
var i;
111108
for ( i = 0; i < dtypes.length; i++ ) {
112-
ch = dtypeChar( dtypes[ i ] );
113-
console.log( '%s => %s', dtypes[ i ], ch );
109+
console.log( '%s => %s', dtypes[ i ], dtypeChar( dtypes[ i ] ) );
114110
}
115111
```
116112

base/dtype-char/examples/index.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@
2020

2121
var dtypeChar = require( './../lib' );
2222

23-
var dtypes;
24-
var ch;
25-
var i;
26-
27-
dtypes = [
23+
var dtypes = [
2824
'float64',
2925
'float32',
3026
'int8',
@@ -39,7 +35,7 @@ dtypes = [
3935
'foobar'
4036
];
4137

38+
var i;
4239
for ( i = 0; i < dtypes.length; i++ ) {
43-
ch = dtypeChar( dtypes[ i ] );
44-
console.log( '%s => %s', dtypes[ i ], ch );
40+
console.log( '%s => %s', dtypes[ i ], dtypeChar( dtypes[ i ] ) );
4541
}

base/dtype-char/test/test.js

Lines changed: 7 additions & 4 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.
@@ -41,7 +41,8 @@ var DTYPES = [
4141
'binary',
4242
'generic',
4343
'complex64',
44-
'complex128'
44+
'complex128',
45+
'bool'
4546
];
4647

4748

@@ -74,7 +75,8 @@ tape( 'the function returns an object mapping data type strings to single letter
7475
'r',
7576
'o',
7677
'c',
77-
'z'
78+
'z',
79+
'x'
7880
];
7981

8082
obj = dtypeChar();
@@ -105,7 +107,8 @@ tape( 'the function returns the single letter character abbreviation for an unde
105107
'r',
106108
'o',
107109
'c',
108-
'z'
110+
'z',
111+
'x'
109112
];
110113
for ( i = 0; i < DTYPES.length; i++ ) {
111114
ch = dtypeChar( DTYPES[ i ] );

base/dtype-desc/README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,7 @@ var obj = dtypeDesc();
8989
```javascript
9090
var dtypeDesc = require( '@stdlib/ndarray/base/dtype-desc' );
9191

92-
var dtypes;
93-
var desc;
94-
var i;
95-
96-
dtypes = [
92+
var dtypes = [
9793
'float64',
9894
'float32',
9995
'int8',
@@ -108,9 +104,9 @@ dtypes = [
108104
'foobar'
109105
];
110106

107+
var i;
111108
for ( i = 0; i < dtypes.length; i++ ) {
112-
desc = dtypeDesc( dtypes[ i ] );
113-
console.log( '%s: %s', dtypes[ i ], desc );
109+
console.log( '%s: %s', dtypes[ i ], dtypeDesc( dtypes[ i ] ) );
114110
}
115111
```
116112

base/dtype-desc/examples/index.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@
2020

2121
var dtypeDesc = require( './../lib' );
2222

23-
var dtypes;
24-
var desc;
25-
var i;
26-
27-
dtypes = [
23+
var dtypes = [
2824
'float64',
2925
'float32',
3026
'int8',
@@ -39,7 +35,7 @@ dtypes = [
3935
'foobar'
4036
];
4137

38+
var i;
4239
for ( i = 0; i < dtypes.length; i++ ) {
43-
desc = dtypeDesc( dtypes[ i ] );
44-
console.log( '%s: %s', dtypes[ i ], desc );
40+
console.log( '%s: %s', dtypes[ i ], dtypeDesc( dtypes[ i ] ) );
4541
}

base/dtype-desc/test/test.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) 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.
@@ -42,7 +42,8 @@ var DTYPES = [
4242
'binary',
4343
'generic',
4444
'complex64',
45-
'complex128'
45+
'complex128',
46+
'bool'
4647
];
4748
var DESC = table();
4849

base/dtype2c/README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,7 @@ var out = dtype2c( 'foobar' );
8282
```javascript
8383
var dtype2c = require( '@stdlib/ndarray/base/dtype2c' );
8484

85-
var dtypes;
86-
var out;
87-
var i;
88-
89-
dtypes = [
85+
var dtypes = [
9086
'float64',
9187
'float32',
9288
'int8',
@@ -101,9 +97,9 @@ dtypes = [
10197
'foobar'
10298
];
10399

100+
var i;
104101
for ( i = 0; i < dtypes.length; i++ ) {
105-
out = dtype2c( dtypes[ i ] );
106-
console.log( '%s => %s', dtypes[ i ], out );
102+
console.log( '%s => %s', dtypes[ i ], dtype2c( dtypes[ i ] ) );
107103
}
108104
```
109105

base/dtype2c/examples/index.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@
2020

2121
var dtype2c = require( './../lib' );
2222

23-
var dtypes;
24-
var out;
25-
var i;
26-
27-
dtypes = [
23+
var dtypes = [
2824
'float64',
2925
'float32',
3026
'int8',
@@ -39,7 +35,7 @@ dtypes = [
3935
'foobar'
4036
];
4137

38+
var i;
4239
for ( i = 0; i < dtypes.length; i++ ) {
43-
out = dtype2c( dtypes[ i ] );
44-
console.log( '%s => %s', dtypes[ i ], out );
40+
console.log( '%s => %s', dtypes[ i ], dtype2c( dtypes[ i ] ) );
4541
}

base/dtype2c/test/test.js

Lines changed: 5 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) 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.
@@ -53,7 +53,8 @@ tape( 'the function returns the C data type associated with a provided data type
5353
'binary',
5454
'generic',
5555
'complex64',
56-
'complex128'
56+
'complex128',
57+
'bool'
5758
];
5859

5960
expected = [
@@ -71,7 +72,8 @@ tape( 'the function returns the C data type associated with a provided data type
7172
null,
7273
null,
7374
'stdlib_complex64_t',
74-
'stdlib_complex128_t'
75+
'stdlib_complex128_t',
76+
'bool'
7577
];
7678
for ( i = 0; i < values.length; i++ ) {
7779
out = dtype2c( values[ i ] );

0 commit comments

Comments
 (0)