Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

np.isnan for np.datetime64 (numpy 1.18) #5736

Closed
quantology opened this issue May 20, 2020 · 1 comment · Fixed by #5758
Closed

np.isnan for np.datetime64 (numpy 1.18) #5736

quantology opened this issue May 20, 2020 · 1 comment · Fixed by #5758

Comments

@quantology
Copy link

The following fails:

from numba import njit
import numpy as np

@njit
def check_nan(dt):
    if np.isnan(dt):
        raise ValueError()
    return dt

check_nan(np.datetime64("2020-01-01"))

with: TypingError: ufunc 'isnan' using the loop 'M->?' not supported in this mode

Not that this also makes np.searchsorted fail on datetime types.

@sklam
Copy link
Member

sklam commented May 21, 2020

np.isnan on datetime64 is a new feature in numpy1.18. Numba has not added all the new features for numpy1.18.

@sklam sklam changed the title np.isnan for np.datetime64 np.isnan for np.datetime64 (numpy 1.18) May 21, 2020
@jakirkham jakirkham mentioned this issue May 26, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants