Skip to content

Commit 894eb44

Browse files
committed
feat: add support for 'typed' data type kind
1 parent 6b9e18f commit 894eb44

File tree

4 files changed

+62
-0
lines changed

4 files changed

+62
-0
lines changed

lib/node_modules/@stdlib/array/dtypes/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ The function supports the following data type kinds:
8181
- `unsigned_integer`: unsigned integer data types.
8282
- `real`: real-valued data types.
8383
- `numeric`: numeric data types.
84+
- `typed`: typed data types.
8485
- `all`: all data types.
8586

8687
Additionally, the function supports extending the "kinds" listed above by appending an `_and_generic` suffix to the kind name (e.g., `real_and_generic`).

lib/node_modules/@stdlib/array/dtypes/docs/repl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
- unsigned_integer: unsigned integer data types.
2929
- real: real-valued data types.
3030
- numeric: numeric data types.
31+
- typed: "typed" data types.
3132
- all: all data types.
3233

3334
Additionally, the function supports extending the "kinds" listed above by

lib/node_modules/@stdlib/array/dtypes/lib/dtypes.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@
1313
"uint8",
1414
"uint8c"
1515
],
16+
"typed": [
17+
"complex64",
18+
"complex128",
19+
"float32",
20+
"float64",
21+
"int16",
22+
"int32",
23+
"int8",
24+
"uint16",
25+
"uint32",
26+
"uint8",
27+
"uint8c"
28+
],
1629
"floating_point": [
1730
"complex64",
1831
"complex128",

lib/node_modules/@stdlib/array/dtypes/test/test.js

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,53 @@ tape( 'the function supports returning a list of array data types (all, includin
104104
t.end();
105105
});
106106

107+
tape( 'the function supports returning a list of array data types (typed)', function test( t ) {
108+
var expected;
109+
var actual;
110+
111+
expected = [
112+
'complex64',
113+
'complex128',
114+
'float32',
115+
'float64',
116+
'int16',
117+
'int32',
118+
'int8',
119+
'uint16',
120+
'uint32',
121+
'uint8',
122+
'uint8c'
123+
];
124+
actual = dtypes( 'typed' );
125+
126+
t.deepEqual( actual, expected, 'returns expected value' );
127+
t.end();
128+
});
129+
130+
tape( 'the function supports returning a list of array data types (typed, including "generic")', function test( t ) {
131+
var expected;
132+
var actual;
133+
134+
expected = [
135+
'complex64',
136+
'complex128',
137+
'float32',
138+
'float64',
139+
'int16',
140+
'int32',
141+
'int8',
142+
'uint16',
143+
'uint32',
144+
'uint8',
145+
'uint8c',
146+
'generic'
147+
];
148+
actual = dtypes( 'typed_and_generic' );
149+
150+
t.deepEqual( actual, expected, 'returns expected value' );
151+
t.end();
152+
});
153+
107154
tape( 'the function supports returning a list of floating-point array data types', function test( t ) {
108155
var expected;
109156
var actual;

0 commit comments

Comments
 (0)