8000 Add commnt · numpy/numpy@d4d2758 · GitHub
[go: up one dir, main page]

Skip to content

Commit d4d2758

Browse files
committed
Add commnt
1 parent e2cc3e6 commit d4d2758

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

numpy/core/src/multiarray/ctors.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2974,6 +2974,7 @@ PyArray_Arange(double start, double stop, double step, int type_num)
29742974
delta = stop - start;
29752975
tmp_len = delta/step;
29762976

2977+
/* Underflow and divide-by-inf check */
29772978
if (tmp_len == 0.0 && delta != 0.0) {
29782979
if (npy_signbit(tmp_len)) {
29792980
length = -1.0;
@@ -3106,6 +3107,7 @@ _calc_length(PyObject *start, PyObject *stop, PyObject *step, PyObject **next, i
31063107
return -1;
31073108
}
31083109

3110+
/* Underflow and divide-by-inf check */
31093111
if (val_is_zero && next_is_nonzero) {
31103112
if (npy_signbit(value)) {
31113113
len = -1.0;

0 commit comments

Comments
 (0)
0