-
-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
00 - BugPriority: highHigh priority, also add milestones for urgent issuesHigh priority, also add milestones for urgent issuescomponent: numpy.ufunc
Description
The __floordiv__ and __mod__ operators do not raise an exception for zero division with np.errstate(divide='raise'), instead replacing those instances with nan as if errstate is in the default state.
import numpy as np
x = np.ones((3, 3))
y = np.zeros((3, 3))
with np.errstate(divide='raise'):
fdiv = x // y # expecting exception
mod = x % y # expecting exceptionNumpy: 1.17.3
Metadata
Metadata
Assignees
Labels
00 - BugPriority: highHigh priority, also add milestones for urgent issuesHigh priority, also add milestones for urgent issuescomponent: numpy.ufunc