Skip to content

Commit 6540f29

Browse files
committed
feat: add support for 16-bit data types
--- 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: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - 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: passed - 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 1390cf3 commit 6540f29

File tree

5 files changed

+13
-1
lines changed

5 files changed

+13
-1
lines changed

lib/node_modules/@stdlib/ndarray/base/dtype-char/include/stdlib/ndarray/base/dtype_char.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ enum STDLIB_NDARRAY_DTYPE_CHAR {
5555
STDLIB_NDARRAY_FLOAT64_CHAR = 'd', // *d*ouble
5656
STDLIB_NDARRAY_FLOAT128_CHAR = 'g',
5757

58+
STDLIB_NDARRAY_COMPLEX32_CHAR = 'j',
5859
STDLIB_NDARRAY_COMPLEX64_CHAR = 'c', // *c*omplex (BLAS convention)
5960
STDLIB_NDARRAY_COMPLEX128_CHAR = 'z', // *z* (BLAS convention)
6061

lib/node_modules/@stdlib/ndarray/base/dtype-char/lib/table.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ function table() {
3232

3333
'bool': 'x',
3434

35+
'complex32': 'j',
3536
'complex64': 'c',
3637
'complex128': 'z',
3738

lib/node_modules/@stdlib/ndarray/base/dtype-char/lib/types.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ f: float32
77
g: float128
88
h: float16
99
i: int32
10-
j:
10+
j: complex32 (16-bit)
1111
k: int16
1212
l: int64
1313
m: int128

lib/node_modules/@stdlib/ndarray/base/dtype-char/src/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ uint8_t stdlib_ndarray_dtype_char( enum STDLIB_NDARRAY_DTYPE dtype ) {
4444
return STDLIB_NDARRAY_FLOAT64_CHAR;
4545
case STDLIB_NDARRAY_FLOAT32:
4646
return STDLIB_NDARRAY_FLOAT32_CHAR;
47+
case STDLIB_NDARRAY_FLOAT16:
48+
return STDLIB_NDARRAY_FLOAT16_CHAR;
4749

4850
case STDLIB_NDARRAY_INT8:
4951
return STDLIB_NDARRAY_INT8_CHAR;
@@ -73,6 +75,8 @@ uint8_t stdlib_ndarray_dtype_char( enum STDLIB_NDARRAY_DTYPE dtype ) {
7375
case STDLIB_NDARRAY_BINARY:
7476
return STDLIB_NDARRAY_BINARY_CHAR;
7577

78+
case STDLIB_NDARRAY_COMPLEX32:
79+
return STDLIB_NDARRAY_COMPLEX32_CHAR;
7680
case STDLIB_NDARRAY_COMPLEX64:
7781
return STDLIB_NDARRAY_COMPLEX64_CHAR;
7882
case STDLIB_NDARRAY_COMPLEX128:

lib/node_modules/@stdlib/ndarray/base/dtype-char/test/test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ var dtypeChar = require( './../lib' );
2929
var DTYPES = [
3030
'float64',
3131
'float32',
32+
'float16',
3233
'int8',
3334
'uint8',
3435
'uint8c',
@@ -40,6 +41,7 @@ var DTYPES = [
4041
'uint64',
4142
'binary',
4243
'generic',
44+
'complex32',
4345
'complex64',
4446
'complex128',
4547
'bool'
@@ -63,6 +65,7 @@ tape( 'the function returns an object mapping data type strings to single letter
6365
expected = [
6466
'd',
6567
'f',
68+
'h',
6669
's',
6770
'b',
6871
'a',
@@ -74,6 +77,7 @@ tape( 'the function returns an object mapping data type strings to single letter
7477
'v',
7578
'r',
7679
'o',
80+
'j',
7781
'c',
7882
'z',
7983
'x'
@@ -95,6 +99,7 @@ tape( 'the function returns the single letter character abbreviation for an unde
9599
expected = [
96100
'd',
97101
'f',
102+
'h',
98103
's',
99104
'b',
100105
'a',
@@ -106,6 +111,7 @@ tape( 'the function returns the single letter character abbreviation for an unde
106111
'v',
107112
'r',
108113
'o',
114+
'j',
109115
'c',
110116
'z',
111117
'x'

0 commit comments

Comments
 (0)