File tree 7 files changed +12
-1
lines changed
lib/node_modules/@stdlib/ndarray/input-casting-policies
7 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ The output array contains the following policies:
53
53
54
54
- ` none ` : do not cast an input ndarray.
55
55
- ` promoted ` : cast an input ndarray to a promoted data type.
56
+ - ` accumulation ` : cast an input ndarray to a data type amenable to accumulation.
56
57
- ` output ` : cast an input ndarray to the data type of the output ndarray.
57
58
58
59
</section >
Original file line number Diff line number Diff line change 6
6
7
7
- none: do not cast an input ndarray.
8
8
- promoted: cast an input ndarray to a promoted data type.
9
+ - accumulation: cast an input ndarray to a data type amenable to
10
+ accumulation.
9
11
- output: cast an input ndarray to the data type of the output ndarray.
10
12
11
13
Returns
Original file line number Diff line number Diff line change 24
24
type Policies = [
25
25
'none' ,
26
26
'promoted' ,
27
+ 'accumulation' ,
27
28
'output'
28
29
] ;
29
30
@@ -36,6 +37,7 @@ type Policies = [
36
37
*
37
38
* - `none`: do not cast an input ndarray.
38
39
* - `promoted`: cast an input ndarray to a promoted data type.
40
+ * - `accumulation`: cast an input ndarray to a data type amenable to accumulation.
39
41
* - `output`: cast an input ndarray to the data type of the output ndarray.
40
42
*
41
43
* @returns list of policies
Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ enum STDLIB_NDARRAY_INPUT_CASTING_POLICY {
36
36
// Cast an input ndarray to a promoted data type:
37
37
STDLIB_NDARRAY_INPUT_CASTING_POLICY_PROMOTED ,
38
38
39
+ // Cast an input ndarray to a data type amenable to accumulation:
40
+ STDLIB_NDARRAY_INPUT_CASTING_POLICY_ACCUMULATION ,
41
+
39
42
// Cast an input ndarray to the data type of the output ndarray:
40
43
STDLIB_NDARRAY_INPUT_CASTING_POLICY_OUTPUT ,
41
44
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ function enumeration() {
40
40
return {
41
41
'none' : 0 ,
42
42
'promoted' : 1 ,
43
- 'output' : 2
43
+ 'accumulation' : 2 ,
44
+ 'output' : 3
44
45
} ;
45
46
}
46
47
Original file line number Diff line number Diff line change 1
1
[
2
2
" none" ,
3
3
" promoted" ,
4
+ " accumulation" ,
4
5
" output"
5
6
]
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ var policies = require( './../lib' );
32
32
var POLICIES = [
33
33
'none' ,
34
34
'promoted' ,
35
+ 'accumulation' ,
35
36
'output'
36
37
] ;
37
38
You can’t perform that action at this time.
0 commit comments