Skip to content

Commit 3a6d47f

Browse files
authored
Add note concerning division by zero for integer dtypes (#311)
1 parent a5489e3 commit 3a6d47f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

spec/API_specification/array_object.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,10 @@ Converts a zero-dimensional floating-point array to a Python `float` object.
628628

629629
Evaluates `self_i // other_i` for each element of an array instance with the respective element of the array `other`.
630630

631+
```{note}
632+
For input arrays which promote to an integer data type, the result of division by zero is unspecified and thus implementation-defined.
633+
```
634+
631635
#### Parameters
632636

633637
- **self**: _<array>_
@@ -903,6 +907,10 @@ The `matmul` function must implement the same semantics as the built-in `@` oper
903907
904908
Evaluates `self_i % other_i` for each element of an array instance with the respective element of the array `other`.
905909
910+
```{note}
911+
For input arrays which promote to an integer data type, the result of division by zero is unspecified and thus implementation-defined.
912+
```
913+
906914
#### Parameters
907915

908916
- **self**: _<array>_

spec/API_specification/elementwise_functions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,10 @@ Rounds each element `x_i` of the input array `x` to the greatest (i.e., closest
668668

669669
Rounds the result of dividing each element `x1_i` of the input array `x1` by the respective element `x2_i` of the input array `x2` to the greatest (i.e., closest to `+infinity`) integer-value number that is not greater than the division result.
670670

671+
```{note}
672+
For input arrays which promote to an integer data type, the result of division by zero is unspecified and thus implementation-defined.
673+
```
674+
671675
#### Parameters
672676

673677
- **x1**: _<array>_
@@ -1213,6 +1217,10 @@ For floating-point operands,
12131217

12141218
Returns the remainder of division for each element `x1_i` of the input array `x1` and the respective element `x2_i` of the input array `x2`.
12151219

1220+
```{note}
1221+
For input arrays which promote to an integer data type, the result of division by zero is unspecified and thus implementation-defined.
1222+
```
1223+
12161224
#### Parameters
12171225

12181226
- **x1**: _<array>_

0 commit comments

Comments
 (0)