File tree Expand file tree Collapse file tree 3 files changed +48
-23
lines changed
lib/node_modules/@stdlib/ndarray/safe-casts Expand file tree Collapse file tree 3 files changed +48
-23
lines changed Original file line number Diff line number Diff line change @@ -93,14 +93,12 @@ var out = safeCasts( 'foo' );
93
93
var dtypes = require ( ' @stdlib/ndarray/dtypes' );
94
94
var safeCasts = require ( ' @stdlib/ndarray/safe-casts' );
95
95
96
- var DTYPES ;
97
- var list;
98
- var i;
99
-
100
96
// Get the list of supported ndarray data types:
101
- DTYPES = dtypes ();
97
+ var DTYPES = dtypes ();
102
98
103
99
// Print the list of ndarray data types to which a data type can be safely cast...
100
+ var list;
101
+ var i;
104
102
for ( i = 0 ; i < DTYPES .length ; i++ ) {
105
103
list = safeCasts ( DTYPES [ i ] );
106
104
console .log ( ' %s: %s' , DTYPES [ i ], list .join ( ' , ' ) );
Original file line number Diff line number Diff line change 21
21
var dtypes = require ( '@stdlib/ndarray/dtypes' ) ;
22
22
var safeCasts = require ( './../lib' ) ;
23
23
24
- var DTYPES ;
25
- var list ;
26
- var i ;
27
-
28
24
// Get the list of supported ndarray data types:
29
- DTYPES = dtypes ( ) ;
25
+ var DTYPES = dtypes ( ) ;
30
26
31
27
// Print the list of ndarray data types to which a data type can be safely cast...
28
+ var list ;
29
+ var i ;
32
30
for ( i = 0 ; i < DTYPES . length ; i ++ ) {
33
31
list = safeCasts ( DTYPES [ i ] ) ;
34
32
console . log ( '%s: %s' , DTYPES [ i ] , list . join ( ', ' ) ) ;
Original file line number Diff line number Diff line change 12
12
"complex128" : 1 ,
13
13
"complex64" : 0 ,
14
14
"binary" : 0 ,
15
- "generic" : 1
15
+ "generic" : 1 ,
16
+ "bool" : 0
16
17
},
17
18
"float32" : {
18
19
"float64" : 1 ,
27
28
"complex128" : 1 ,
28
29
"complex64" : 1 ,
29
30
"binary" : 0 ,
30
- "generic" : 1
31
+ "generic" : 1 ,
32
+ "bool" : 0
31
33
},
32
34
"int32" : {
33
35
"float64" : 1 ,
42
44
"complex128" : 1 ,
43
45
"complex64" : 0 ,
44
46
"binary" : 0 ,
45
- "generic" : 1
47
+ "generic" : 1 ,
48
+ "bool" : 0
46
49
},
47
50
"int16" : {
48
51
"float64" : 1 ,
57
60
"complex128" : 1 ,
58
61
"complex64" : 1 ,
59
62
"binary" : 0 ,
60
- "generic" : 1
63
+ "generic" : 1 ,
64
+ "bool" : 0
61
65
},
62
66
"int8" : {
63
67
"float64" : 1 ,
72
76
"complex128" : 1 ,
73
77
"complex64" : 1 ,
74
78
"binary" : 0 ,
75
- "generic" : 1
79
+ "generic" : 1 ,
80
+ "bool" : 0
76
81
},
77
82
"uint32" : {
78
83
"float64" : 1 ,
87
92
"complex128" : 1 ,
88
93
"complex64" : 0 ,
89
94
"binary" : 0 ,
90
- "generic" : 1
95
+ "generic" : 1 ,
96
+ "bool" : 0
91
97
},
92
98
"uint16" : {
93
99
"float64" : 1 ,
102
108
"complex128" : 1 ,
103
109
"complex64" : 1 ,
104
110
"binary" : 0 ,
105
- "generic" : 1
111
+ "generic" : 1 ,
112
+ "bool" : 0
106
113
},
107
114
"uint8" : {
108
115
"float64" : 1 ,
117
124
"complex128" : 1 ,
118
125
"complex64" : 1 ,
119
126
"binary" : 0 ,
120
- "generic" : 1
127
+ "generic" : 1 ,
128
+ "bool" : 0
121
129
},
122
130
"uint8c" : {
123
131
"float64" : 1 ,
132
140
"complex128" : 1 ,
133
141
"complex64" : 1 ,
134
142
"binary" : 0 ,
135
- "generic" : 1
143
+ "generic" : 1 ,
144
+ "bool" : 0
136
145
},
137
146
"complex128" : {
138
147
"float64" : 0 ,
147
156
"complex128" : 1 ,
148
157
"complex64" : 0 ,
149
158
"binary" : 0 ,
150
- "generic" : 1
159
+ "generic" : 1 ,
160
+ "bool" : 0
151
161
},
152
162
"complex64" : {
153
163
"float64" : 0 ,
162
172
"complex128" : 1 ,
163
173
"complex64" : 1 ,
164
174
"binary" : 0 ,
165
- "generic" : 1
175
+ "generic" : 1 ,
176
+ "bool" : 0
166
177
},
167
178
"generic" : {
168
179
"float64" : 0 ,
177
188
"complex128" : 0 ,
178
189
"complex64" : 0 ,
179
190
"binary" : 0 ,
180
- "generic" : 1
191
+ "generic" : 1 ,
192
+ "bool" : 0
181
193
},
182
194
"binary" : {
183
195
"float64" : 0 ,
192
204
"complex128" : 0 ,
193
205
"complex64" : 0 ,
194
206
"binary" : 1 ,
195
- "generic" : 0
207
+ "generic" : 0 ,
208
+ "bool" : 0
209
+ },
210
+ "bool" : {
211
+ "float64" : 0 ,
212
+ "float32" : 0 ,
213
+ "int32" : 0 ,
214
+ "int16" : 0 ,
215
+ "int8" : 0 ,
216
+ "uint32" : 0 ,
217
+ "uint16" : 0 ,
218
+ "uint8" : 0 ,
219
+ "uint8c" : 0 ,
220
+ "complex128" : 0 ,
221
+ "complex64" : 0 ,
222
+ "binary" : 0 ,
223
+ "generic" : 1 ,
224
+ "bool" : 1
196
225
}
197
226
}
You can’t perform that action at this time.
0 commit comments