You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/API_specification/array_object.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1075,6 +1075,12 @@ Element-wise results must equal the results returned by the equivalent element-w
1075
1075
1076
1076
Calculates an implementation-dependent approximation of exponentiation by raising each element (the base) of an array instance to the power of `other_i` (the exponent), where `other_i` is the corresponding element of the array `other`.
1077
1077
1078
+
```{note}
1079
+
If both `self` and `other` have integer data types, the result of `__pow__` when `other_i` is negative (i.e., less than zero) is unspecified and thus implementation-dependent.
1080
+
1081
+
If `self` has an integer data type and `other` has a floating-point data type, behavior is implementation-dependent (type promotion between data type "kinds" (integer versus floating-point) is unspecified).
1082
+
```
1083
+
1078
1084
#### Special Cases
1079
1085
1080
1086
For floating-point operands, let `self` equal `x1` and `other` equal `x2`.
@@ -1247,7 +1253,7 @@ For floating-point operands, let `self` equal `x1` and `other` equal `x2`.
1247
1253
1248
1254
-**out**: _<array>_
1249
1255
1250
-
- an array containing the element-wise results. The returned array must have a data type determined by {ref}`type-promotion`.
1256
+
- an array containing the element-wise results. The returned array should have a floating-point data type determined by {ref}`type-promotion`.
1251
1257
1252
1258
```{note}
1253
1259
Element-wise results must equal the results returned by the equivalent element-wise function [`divide(x1, x2)`](elementwise_functions.md#dividex1-x2-).
Copy file name to clipboardExpand all lines: spec/API_specification/elementwise_functions.md
+10-4Lines changed: 10 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -559,11 +559,11 @@ For floating-point operands,
559
559
560
560
-**x1**: _<array>_
561
561
562
-
- dividend input array. Should have a floating-point data type.
562
+
- dividend input array. Should have a numeric data type.
563
563
564
564
-**x2**: _<array>_
565
565
566
-
- divisor input array. Must be compatible with `x1` (see {ref}`broadcasting`). Should have a floating-point data type.
566
+
- divisor input array. Must be compatible with `x1` (see {ref}`broadcasting`). Should have a numeric data type.
567
567
568
568
#### Returns
569
569
@@ -1183,6 +1183,12 @@ Computes the numerical positive of each element `x_i` (i.e., `y_i = +x_i`) of th
1183
1183
1184
1184
Calculates an implementation-dependent approximation of exponentiation by raising each element `x1_i` (the base) of the input array `x1` to the power of `x2_i` (the exponent), where `x2_i` is the corresponding element of the input array `x2`.
1185
1185
1186
+
```{note}
1187
+
If both `x1` and `x2` have integer data types, the result of `pow` when `x2_i` is negative (i.e., less than zero) is unspecified and thus implementation-dependent.
1188
+
1189
+
If `x1` has an integer data type and `x2` has a floating-point data type, behavior is implementation-dependent (type promotion between data type "kinds" (integer versus floating-point) is unspecified).
1190
+
```
1191
+
1186
1192
#### Special Cases
1187
1193
1188
1194
For floating-point operands,
@@ -1216,11 +1222,11 @@ For floating-point operands,
1216
1222
1217
1223
-**x1**: _<array>_
1218
1224
1219
-
- first input array whose elements correspond to the exponentiation base. Should have a floating-point data type.
1225
+
- first input array whose elements correspond to the exponentiation base. Should have a numeric data type.
1220
1226
1221
1227
-**x2**: _<array>_
1222
1228
1223
-
- second input array whose elements correspond to the exponentiation exponent. Must be compatible with `x1` (see {ref}`broadcasting`). Should have a floating-point data type.
1229
+
- second input array whose elements correspond to the exponentiation exponent. Must be compatible with `x1` (see {ref}`broadcasting`). Should have a numeric data type.
0 commit comments