File tree Expand file tree Collapse file tree 13 files changed +43
-67
lines changed Expand file tree Collapse file tree 13 files changed +43
-67
lines changed Original file line number Diff line number Diff line change @@ -286,6 +286,7 @@ A total of 3 people contributed to this release. Thank you to the following cont
286
286
287
287
<details >
288
288
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)_
289
290
- [ ` 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)_
290
291
- [ ` b8bd516 ` ] ( https://github.com/stdlib-js/stdlib/commit/b8bd51687cabdda74299cb37b9a5527fddd35aaa ) - ** feat:** update namespace TypeScript declarations [ (##2351 )] ( #2351 ) _ (by stdlib-bot, Philipp Burckhardt)_
291
292
- [ ` 539fc72 ` ] ( https://github.com/stdlib-js/stdlib/commit/539fc725d1fea6738862de98e3f3c6385fbdc0e6 ) - ** style:** fix indentation _ (by Athan Reines)_
Original file line number Diff line number Diff line change @@ -90,11 +90,7 @@ var out = char2dtype();
90
90
var dtypeChar = require ( ' @stdlib/ndarray/base/dtype-char' );
91
91
var char2dtype = require ( ' @stdlib/ndarray/base/char2dtype' );
92
92
93
- var chars;
94
- var out;
95
- var i;
96
-
97
- chars = [
93
+ var chars = [
98
94
dtypeChar ( ' float64' ),
99
95
dtypeChar ( ' float32' ),
100
96
dtypeChar ( ' int8' ),
@@ -109,9 +105,9 @@ chars = [
109
105
' ('
110
106
];
111
107
108
+ var i;
112
109
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 ] ) );
115
111
}
116
112
```
117
113
Original file line number Diff line number Diff line change 21
21
var dtypeChar = require ( './../../../base/dtype-char' ) ;
22
22
var char2dtype = require ( './../lib' ) ;
23
23
24
- var chars ;
25
- var out ;
26
- var i ;
27
-
28
- chars = [
24
+ var chars = [
29
25
dtypeChar ( 'float64' ) ,
30
26
dtypeChar ( 'float32' ) ,
31
27
dtypeChar ( 'int8' ) ,
@@ -40,7 +36,7 @@ chars = [
40
36
'('
41
37
] ;
42
38
39
+ var i ;
43
40
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 ] ) ) ;
46
42
}
Original file line number Diff line number Diff line change 1
1
/**
2
2
* @license Apache-2.0
3
3
*
4
- * Copyright (c) 2021 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.
@@ -61,7 +61,8 @@ tape( 'the function returns the data type string associated with a provided sing
61
61
'binary' ,
62
62
'generic' ,
63
63
'complex64' ,
64
- 'complex128'
64
+ 'complex128' ,
65
+ 'bool'
65
66
] ;
66
67
for ( i = 0 ; i < expected . length ; i ++ ) {
67
68
ch = dtypeChar ( expected [ i ] ) ;
Original file line number Diff line number Diff line change @@ -89,11 +89,7 @@ var obj = dtypeChar();
89
89
``` javascript
90
90
var dtypeChar = require ( ' @stdlib/ndarray/base/dtype-char' );
91
91
92
- var dtypes;
93
- var ch;
94
- var i;
95
-
96
- dtypes = [
92
+ var dtypes = [
97
93
' float64' ,
98
94
' float32' ,
99
95
' int8' ,
@@ -108,9 +104,9 @@ dtypes = [
108
104
' foobar'
109
105
];
110
106
107
+ var i;
111
108
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 ] ) );
114
110
}
115
111
```
116
112
Original file line number Diff line number Diff line change 20
20
21
21
var dtypeChar = require ( './../lib' ) ;
22
22
23
- var dtypes ;
24
- var ch ;
25
- var i ;
26
-
27
- dtypes = [
23
+ var dtypes = [
28
24
'float64' ,
29
25
'float32' ,
30
26
'int8' ,
@@ -39,7 +35,7 @@ dtypes = [
39
35
'foobar'
40
36
] ;
41
37
38
+ var i ;
42
39
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 ] ) ) ;
45
41
}
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.
@@ -41,7 +41,8 @@ var DTYPES = [
41
41
'binary' ,
42
42
'generic' ,
43
43
'complex64' ,
44
- 'complex128'
44
+ 'complex128' ,
45
+ 'bool'
45
46
] ;
46
47
47
48
@@ -74,7 +75,8 @@ tape( 'the function returns an object mapping data type strings to single letter
74
75
'r' ,
75
76
'o' ,
76
77
'c' ,
77
- 'z'
78
+ 'z' ,
79
+ 'x'
78
80
] ;
79
81
80
82
obj = dtypeChar ( ) ;
@@ -105,7 +107,8 @@ tape( 'the function returns the single letter character abbreviation for an unde
105
107
'r' ,
106
108
'o' ,
107
109
'c' ,
108
- 'z'
110
+ 'z' ,
111
+ 'x'
109
112
] ;
110
113
for ( i = 0 ; i < DTYPES . length ; i ++ ) {
111
114
ch = dtypeChar ( DTYPES [ i ] ) ;
Original file line number Diff line number Diff line change @@ -89,11 +89,7 @@ var obj = dtypeDesc();
89
89
``` javascript
90
90
var dtypeDesc = require ( ' @stdlib/ndarray/base/dtype-desc' );
91
91
92
- var dtypes;
93
- var desc;
94
- var i;
95
-
96
- dtypes = [
92
+ var dtypes = [
97
93
' float64' ,
98
94
' float32' ,
99
95
' int8' ,
@@ -108,9 +104,9 @@ dtypes = [
108
104
' foobar'
109
105
];
110
106
107
+ var i;
111
108
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 ] ) );
114
110
}
115
111
```
116
112
Original file line number Diff line number Diff line change 20
20
21
21
var dtypeDesc = require ( './../lib' ) ;
22
22
23
- var dtypes ;
24
- var desc ;
25
- var i ;
26
-
27
- dtypes = [
23
+ var dtypes = [
28
24
'float64' ,
29
25
'float32' ,
30
26
'int8' ,
@@ -39,7 +35,7 @@ dtypes = [
39
35
'foobar'
40
36
] ;
41
37
38
+ var i ;
42
39
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 ] ) ) ;
45
41
}
Original file line number Diff line number Diff line change 1
1
/**
2
2
* @license Apache-2.0
3
3
*
4
- * Copyright (c) 2021 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.
@@ -42,7 +42,8 @@ var DTYPES = [
42
42
'binary' ,
43
43
'generic' ,
44
44
'complex64' ,
45
- 'complex128'
45
+ 'complex128' ,
46
+ 'bool'
46
47
] ;
47
48
var DESC = table ( ) ;
48
49
Original file line number Diff line number Diff line change @@ -82,11 +82,7 @@ var out = dtype2c( 'foobar' );
82
82
``` javascript
83
83
var dtype2c = require ( ' @stdlib/ndarray/base/dtype2c' );
84
84
85
- var dtypes;
86
- var out;
87
- var i;
88
-
89
- dtypes = [
85
+ var dtypes = [
90
86
' float64' ,
91
87
' float32' ,
92
88
' int8' ,
@@ -101,9 +97,9 @@ dtypes = [
101
97
' foobar'
102
98
];
103
99
100
+ var i;
104
101
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 ] ) );
107
103
}
108
104
```
109
105
Original file line number Diff line number Diff line change 20
20
21
21
var dtype2c = require ( './../lib' ) ;
22
22
23
- var dtypes ;
24
- var out ;
25
- var i ;
26
-
27
- dtypes = [
23
+ var dtypes = [
28
24
'float64' ,
29
25
'float32' ,
30
26
'int8' ,
@@ -39,7 +35,7 @@ dtypes = [
39
35
'foobar'
40
36
] ;
41
37
38
+ var i ;
42
39
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 ] ) ) ;
45
41
}
Original file line number Diff line number Diff line change 1
1
/**
2
2
* @license Apache-2.0
3
3
*
4
- * Copyright (c) 2021 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.
@@ -53,7 +53,8 @@ tape( 'the function returns the C data type associated with a provided data type
53
53
'binary' ,
54
54
'generic' ,
55
55
'complex64' ,
56
- 'complex128'
56
+ 'complex128' ,
57
+ 'bool'
57
58
] ;
58
59
59
60
expected = [
@@ -71,7 +72,8 @@ tape( 'the function returns the C data type associated with a provided data type
71
72
null ,
72
73
null ,
73
74
'stdlib_complex64_t' ,
74
- 'stdlib_complex128_t'
75
+ 'stdlib_complex128_t' ,
76
+ 'bool'
75
77
] ;
76
78
for ( i = 0 ; i < values . length ; i ++ ) {
77
79
out = dtype2c ( values [ i ] ) ;
You can’t perform that action at this time.
0 commit comments