Skip to content

Commit 03effb2

Browse files
committed
feat: add real data type kind
1 parent 223c329 commit 03effb2

File tree

5 files changed

+35
-1
lines changed

5 files changed

+35
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ The function supports the following data type kinds:
8080
- `integral`: integer data types.
8181
- `signed_integer`: signed integer data types.
8282
- `unsigned_integer`: unsigned integer data types.
83+
- `real`: real-valued data types.
8384
- `numeric`: numeric data types.
8485
- `all`: all data types.
8586

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
- integral: integer data types.
2828
- signed_integer: signed integer data types.
2929
- unsigned_integer: unsigned integer data types.
30+
- real: real-valued data types.
3031
- numeric: numeric data types.
3132
- all: all data types.
3233

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* Data type kind.
2323
*/
24-
type Kind = 'all' | 'numeric' | 'floating_point' | 'real_floating_point' | 'complex_floating_point' | 'integral' | 'signed_integer' | 'unsigned_integer'; // tslint-disable-line max-line-length
24+
type Kind = 'all' | 'numeric' | 'real' | 'floating_point' | 'real_floating_point' | 'complex_floating_point' | 'integral' | 'signed_integer' | 'unsigned_integer'; // tslint-disable-line max-line-length
2525

2626
/**
2727
* Returns a list of ndarray data types.

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@
4848
"uint8",
4949
"uint8c"
5050
],
51+
"real": [
52+
"float32",
53+
"float64",
54+
"int16",
55+
"int32",
56+
"int8",
57+
"uint16",
58+
"uint32",
59+
"uint8",
60+
"uint8c"
61+
],
5162
"numeric": [
5263
"complex64",
5364
"complex128",

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,27 @@ tape( 'the function supports returning a list of unsigned integer ndarray data t
199199
t.end();
200200
});
201201

202+
tape( 'the function supports returning a list of real-valued ndarray data types', function test( t ) {
203+
var expected;
204+
var actual;
205+
206+
expected = [
207+
'float32',
208+
'float64',
209+
'int16',
210+
'int32',
211+
'int8',
212+
'uint16',
213+
'uint32',
214+
'uint8',
215+
'uint8c'
216+
];
217+
actual = dtypes( 'real' );
218+
219+
t.deepEqual( actual, expected, 'returns expected value' );
220+
t.end();
221+
});
222+
202223
tape( 'the function supports returning a list of numeric ndarray data types', function test( t ) {
203224
var expected;
204225
var actual;

0 commit comments

Comments
 (0)