-
Notifications
You must be signed in to change notification settings - Fork 129
Implement equivalent to numpy.nan_to_num
#479
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
Comments
nump.nan_to_num
numpy.nan_to_num
I'm interested in working on this. |
import numpy as np nan_replace = -1 def custom_nan_to_num(arr, nan_val=0.0, posinf_val=None, neginf_val=None):
Apply the custom functionresult = custom_nan_to_num(example_array, nan_val=nan_replace, print(result) Im new to this.....Can you let me know if its something like this or the function of numpy.nan_to_num is to be replaced? |
Description
A couple of switches should do the job, no need to implement a new Op
https://numpy.org/doc/stable/reference/generated/numpy.nan_to_num.html
The text was updated successfully, but these errors were encountered: