Skip to content

Commit 2ca5b79

Browse files
committed
Try @cgohlke fix for issue #163
1 parent 6952713 commit 2ca5b79

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

bottleneck/src/reduce_template.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ REDUCE_ALL(nansum, DTYPE0)
129129
NEXT
130130
}
131131
BN_END_ALLOW_THREADS
132-
return PyInt_FromLong(asum);
132+
return PyLong_FromLongLong(asum);
133133
}
134134

135135
REDUCE_ONE(nansum, DTYPE0)

bottleneck/tests/util.py

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def array_generator(func_name, dtypes):
109109
yield np.array([1, 2, 3]) + 1e9 # check that move_std is robust
110110
yield np.array([0, 0, 0]) # nanargmax/nanargmin
111111
yield np.array([1, nan, nan, 2]) # nanmedian
112+
yield np.array([2**31], dtype=np.int64) # nansum on windows
112113

113114
# ties
114115
yield np.array([0, 0, 0])

0 commit comments

Comments
 (0)