Skip to content

Commit 0cf010e

Browse files
committed
feat: add accumulation input casting policy
--- 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: 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: 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 0b8d575 commit 0cf010e

File tree

7 files changed

+12
-1
lines changed

7 files changed

+12
-1
lines changed

lib/node_modules/@stdlib/ndarray/input-casting-policies/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ The output array contains the following policies:
5353

5454
- `none`: do not cast an input ndarray.
5555
- `promoted`: cast an input ndarray to a promoted data type.
56+
- `accumulation`: cast an input ndarray to a data type amenable to accumulation.
5657
- `output`: cast an input ndarray to the data type of the output ndarray.
5758

5859
</section>

lib/node_modules/@stdlib/ndarray/input-casting-policies/docs/repl.txt

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
- none: do not cast an input ndarray.
88
- promoted: cast an input ndarray to a promoted data type.
9+
- accumulation: cast an input ndarray to a data type amenable to
10+
accumulation.
911
- output: cast an input ndarray to the data type of the output ndarray.
1012

1113
Returns

lib/node_modules/@stdlib/ndarray/input-casting-policies/docs/types/index.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
type Policies = [
2525
'none',
2626
'promoted',
27+
'accumulation',
2728
'output'
2829
];
2930

@@ -36,6 +37,7 @@ type Policies = [
3637
*
3738
* - `none`: do not cast an input ndarray.
3839
* - `promoted`: cast an input ndarray to a promoted data type.
40+
* - `accumulation`: cast an input ndarray to a data type amenable to accumulation.
3941
* - `output`: cast an input ndarray to the data type of the output ndarray.
4042
*
4143
* @returns list of policies

lib/node_modules/@stdlib/ndarray/input-casting-policies/include/stdlib/ndarray/input_casting_policies.h

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ enum STDLIB_NDARRAY_INPUT_CASTING_POLICY {
3636
// Cast an input ndarray to a promoted data type:
3737
STDLIB_NDARRAY_INPUT_CASTING_POLICY_PROMOTED,
3838

39+
// Cast an input ndarray to a data type amenable to accumulation:
40+
STDLIB_NDARRAY_INPUT_CASTING_POLICY_ACCUMULATION,
41+
3942
// Cast an input ndarray to the data type of the output ndarray:
4043
STDLIB_NDARRAY_INPUT_CASTING_POLICY_OUTPUT,
4144

lib/node_modules/@stdlib/ndarray/input-casting-policies/lib/enum.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ function enumeration() {
4040
return {
4141
'none': 0,
4242
'promoted': 1,
43-
'output': 2
43+
'accumulation': 2,
44+
'output': 3
4445
};
4546
}
4647

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[
22
"none",
33
"promoted",
4+
"accumulation",
45
"output"
56
]

lib/node_modules/@stdlib/ndarray/input-casting-policies/test/test.js

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ var policies = require( './../lib' );
3232
var POLICIES = [
3333
'none',
3434
'promoted',
35+
'accumulation',
3536
'output'
3637
];
3738

0 commit comments

Comments
 (0)