Skip to content

Commit 1127626

Browse files
committed
feat: add real policy
1 parent bd1017d commit 1127626

File tree

7 files changed

+12
-1
lines changed

7 files changed

+12
-1
lines changed

lib/node_modules/@stdlib/ndarray/output-dtype-policies/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ The output `array` contains the following data type policies:
6060
- `floating_point`: return a floating-point data type (i.e., either real-valued or complex-valued).
6161
- `real_floating_point`: return a real-valued floating-point data type.
6262
- `complex_floating_point`: return a complex-valued floating-point data type.
63+
- `real`: return a real-valued data type.
64+
- `numeric`: return a numeric data type.
6365

6466
</section>
6567

lib/node_modules/@stdlib/ndarray/output-dtype-policies/docs/repl.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
- same: return the same data type.
88
- promoted: return a promoted data type.
99
- bool: return a boolean data type.
10+
- numeric: return numeric data type.
11+
- real: return a real-valued data type.
1012
- signed_integer: return a signed integer data type.
1113
- unsigned_integer: return an unsigned integer data type.
1214
- integral: return an integer data type (i.e., either signed or unsigned).

lib/node_modules/@stdlib/ndarray/output-dtype-policies/docs/types/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
* - `same`: return the same data type.
2929
* - `promoted`: return a promoted data type.
3030
* - `bool`: return a boolean data type.
31+
* - `numeric`: return a numeric data type.
32+
* - `real`: return a real-valued data type.
3133
* - `signed_integer`: return a signed integer data type.
3234
* - `unsigned_integer`: return an unsigned integer data type.
3335
* - `integral`: return an integer data type (i.e., either signed or unsigned).

lib/node_modules/@stdlib/ndarray/output-dtype-policies/include/stdlib/ndarray/output_dtype_policies.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ enum STDLIB_NDARRAY_OUTPUT_DTYPE_POLICY {
3939
STDLIB_NDARRAY_OUTPUT_POLICY_FLOATING_POINT,
4040
STDLIB_NDARRAY_OUTPUT_POLICY_REAL_FLOATING_POINT,
4141
STDLIB_NDARRAY_OUTPUT_POLICY_COMPLEX_FLOATING_POINT,
42+
STDLIB_NDARRAY_OUTPUT_POLICY_REAL,
4243
STDLIB_NDARRAY_OUTPUT_POLICY_NUMERIC,
4344

4445
// "Compute" the number of data type policies (this works because of how `enum` works: the value is automatically set to the last enumerated type plus 1):

lib/node_modules/@stdlib/ndarray/output-dtype-policies/lib/enum.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ function enumeration() {
4747
'floating_point': 6,
4848
'real_floating_point': 7,
4949
'complex_floating_point': 8,
50-
'numeric': 9
50+
'real': 9,
51+
'numeric': 10
5152
};
5253
}
5354

lib/node_modules/@stdlib/ndarray/output-dtype-policies/lib/policies.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"floating_point",
99
"real_floating_point",
1010
"complex_floating_point",
11+
"real",
1112
"numeric"
1213
]

lib/node_modules/@stdlib/ndarray/output-dtype-policies/test/test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ var POLICIES = [
3939
'floating_point',
4040
'real_floating_point',
4141
'complex_floating_point',
42+
'real',
4243
'numeric'
4344
];
4445

@@ -65,6 +66,7 @@ tape( 'the function returns a list of ndarray data type policies', function test
6566
'floating_point',
6667
'real_floating_point',
6768
'complex_floating_point',
69+
'real',
6870
'numeric'
6971
];
7072
actual = policies();

0 commit comments

Comments
 (0)