Skip to content

Commit 6b9e18f

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

File tree

5 files changed

+40
-35
lines changed

5 files changed

+40
-35
lines changed

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

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

8788
</section>

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

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,6 @@
22
{{alias}}( [kind] )
33
Returns a list of ndarray data types.
44

5-
When not provided a data type "kind", the function returns an array
6-
containing the following data types:
7-
8-
- binary: binary.
9-
- complex64: single-precision complex floating-point numbers.
10-
- complex128: double-precision complex floating-point numbers.
11-
- float32: single-precision floating-point numbers.
12-
- float64: double-precision floating-point numbers.
13-
- generic: values of any type.
14-
- int16: signed 16-bit integers.
15-
- int32: signed 32-bit integers.
16-
- int8: signed 8-bit integers.
17-
- uint16: unsigned 16-bit integers.
18-
- uint32: unsigned 32-bit integers.
19-
- uint8: unsigned 8-bit integers.
20-
- uint8c: unsigned clamped 8-bit integers.
21-
225
The function supports the following data type "kinds":
236

247
- floating_point: floating-point data types.
@@ -29,6 +12,7 @@
2912
- unsigned_integer: unsigned integer data types.
3013
- real: real-valued data types.
3114
- numeric: numeric data types.
15+
- typed: typed data types.
3216
- all: all data types.
3317

3418
Parameters

lib/node_modules/@stdlib/ndarray/dtypes/docs/types/index.d.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,6 @@ import { DataType, DataTypeKind } from '@stdlib/types/ndarray';
2525
/**
2626
* Returns a list of ndarray data types.
2727
*
28-
* ## Notes
29-
*
30-
* - When not provided a data type "kind", the function returns an array containing the following data types:
31-
*
32-
* - `binary`: binary.
33-
* - `complex64`: single-precision complex floating-point numbers.
34-
* - `complex128`: double-precision complex floating-point numbers.
35-
* - `float32`: single-precision floating-point numbers.
36-
* - `float64`: double-precision floating-point numbers.
37-
* - `generic`: values of any type.
38-
* - `int16`: signed 16-bit integers.
39-
* - `int32`: signed 32-bit integers.
40-
* - `int8`: signed 8-bit integers.
41-
* - `uint16`: unsigned 16-bit integers.
42-
* - `uint32`: unsigned 32-bit integers.
43-
* - `uint8`: unsigned 8-bit integers.
44-
* - `uint8c`: unsigned clamped 8-bit integers.
45-
*
4628
* @param kind - data type kind
4729
* @returns list of ndarray data types
4830
*

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@
1414
"uint8",
1515
"uint8c"
1616
],
17+
"typed": [
18+
"binary",
19+
"complex64",
20+
"complex128",
21+
"float32",
22+
"float64",
23+
"int16",
24+
"int32",
25+
"int8",
26+
"uint16",
27+
"uint32",
28+
"uint8",
29+
"uint8c"
30+
],
1731
"floating_point": [
1832
"complex64",
1933
"complex128",

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,30 @@ tape( 'the function supports returning a list of ndarray data types (all)', func
105105
t.end();
106106
});
107107

108+
tape( 'the function supports returning a list of ndarray data types (typed)', function test( t ) {
109+
var expected;
110+
var actual;
111+
112+
expected = [
113+
'binary',
114+
'complex64',
115+
'complex128',
116+
'float32',
117+
'float64',
118+
'int16',
119+
'int32',
120+
'int8',
121+
'uint16',
122+
'uint32',
123+
'uint8',
124+
'uint8c'
125+
];
126+
actual = dtypes( 'typed' );
127+
128+
t.deepEqual( actual, expected, 'returns expected value' );
129+
t.end();
130+
});
131+
108132
tape( 'the function supports returning a list of floating-point ndarray data types', function test( t ) {
109133
var expected;
110134
var actual;

0 commit comments

Comments
 (0)