Skip to content

Commit a76c12c

Browse files
committed
feat: add indexing data type kind
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 05e83e1 commit a76c12c

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ The function supports the following data type kinds:
8585
- `real`: real-valued data types.
8686
- `numeric`: numeric data types.
8787
- `typed`: typed data types.
88+
- `indexing`: ndarray index data types.
8889
- `all`: all data types.
8990

9091
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/ndarray/dtypes/docs/repl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
- real: real-valued data types.
3333
- numeric: numeric data types.
3434
- typed: typed data types.
35+
- indexing: ndarray index data types.
3536
- all: all data types.
3637

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

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,8 @@
9090
"uint32",
9191
"uint8",
9292
"uint8c"
93+
],
94+
"indexing": [
95+
"int32"
9396
]
9497
}

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,33 @@ tape( 'the function supports returning a list of numeric ndarray data types (inc
497497
t.end();
498498
});
499499

500+
tape( 'the function supports returning a list of indexing ndarray data types', function test( t ) {
501+
var expected;
502+
var actual;
503+
504+
expected = [
505+
'int32'
506+
];
507+
actual = dtypes( 'indexing' );
508+
509+
t.deepEqual( actual, expected, 'returns expected value' );
510+
t.end();
511+
});
512+
513+
tape( 'the function supports returning a list of indexing ndarray data types (including "generic")', function test( t ) {
514+
var expected;
515+
var actual;
516+
517+
expected = [
518+
'int32',
519+
'generic'
520+
];
521+
actual = dtypes( 'indexing_and_generic' );
522+
523+
t.deepEqual( actual, expected, 'returns expected value' );
524+
t.end();
525+
});
526+
500527
tape( 'the function returns an empty array if provided an unrecognized data type kind', function test( t ) {
501528
t.deepEqual( dtypes( 'beep' ), [], 'returns expected value' );
502529
t.deepEqual( dtypes( 'beep_and_generic' ), [], 'returns expected value' );

0 commit comments

Comments
 (0)