Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Feb 7, 2024
1 parent bf8bb2d commit 8843c9d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 35 deletions.
1 change: 1 addition & 0 deletions dtypes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ The function supports the following data type kinds:
- `unsigned_integer`: unsigned integer data types.
- `real`: real-valued data types.
- `numeric`: numeric data types.
- `typed`: typed data types.
- `all`: all data types.

</section>
Expand Down
18 changes: 1 addition & 17 deletions dtypes/docs/repl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,6 @@
{{alias}}( [kind] )
Returns a list of ndarray data types.

When not provided a data type "kind", the function returns an array
containing the following data types:

- binary: binary.
- complex64: single-precision complex floating-point numbers.
- complex128: double-precision complex floating-point numbers.
- float32: single-precision floating-point numbers.
- float64: double-precision floating-point numbers.
- generic: values of any type.
- int16: signed 16-bit integers.
- int32: signed 32-bit integers.
- int8: signed 8-bit integers.
- uint16: unsigned 16-bit integers.
- uint32: unsigned 32-bit integers.
- uint8: unsigned 8-bit integers.
- uint8c: unsigned clamped 8-bit integers.

The function supports the following data type "kinds":

- floating_point: floating-point data types.
Expand All @@ -29,6 +12,7 @@
- unsigned_integer: unsigned integer data types.
- real: real-valued data types.
- numeric: numeric data types.
- typed: typed data types.
- all: all data types.

Parameters
Expand Down
18 changes: 0 additions & 18 deletions dtypes/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,6 @@ import { DataType, DataTypeKind } from '@stdlib/types/ndarray';
/**
* Returns a list of ndarray data types.
*
* ## Notes
*
* - When not provided a data type "kind", the function returns an array containing the following data types:
*
* - `binary`: binary.
* - `complex64`: single-precision complex floating-point numbers.
* - `complex128`: double-precision complex floating-point numbers.
* - `float32`: single-precision floating-point numbers.
* - `float64`: double-precision floating-point numbers.
* - `generic`: values of any type.
* - `int16`: signed 16-bit integers.
* - `int32`: signed 32-bit integers.
* - `int8`: signed 8-bit integers.
* - `uint16`: unsigned 16-bit integers.
* - `uint32`: unsigned 32-bit integers.
* - `uint8`: unsigned 8-bit integers.
* - `uint8c`: unsigned clamped 8-bit integers.
*
* @param kind - data type kind
* @returns list of ndarray data types
*
Expand Down
14 changes: 14 additions & 0 deletions dtypes/lib/dtypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@
"uint8",
"uint8c"
],
"typed": [
"binary",
"complex64",
"complex128",
"float32",
"float64",
"int16",
"int32",
"int8",
"uint16",
"uint32",
"uint8",
"uint8c"
],
"floating_point": [
"complex64",
"complex128",
Expand Down
24 changes: 24 additions & 0 deletions dtypes/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,30 @@ tape( 'the function supports returning a list of ndarray data types (all)', func
t.end();
});

tape( 'the function supports returning a list of ndarray data types (typed)', function test( t ) {
var expected;
var actual;

expected = [
'binary',
'complex64',
'complex128',
'float32',
'float64',
'int16',
'int32',
'int8',
'uint16',
'uint32',
'uint8',
'uint8c'
];
actual = dtypes( 'typed' );

t.deepEqual( actual, expected, 'returns expected value' );
t.end();
});

tape( 'the function supports returning a list of floating-point ndarray data types', function test( t ) {
var expected;
var actual;
Expand Down

0 comments on commit 8843c9d

Please sign in to comment.