SyntaxFix
Write A Post
Hire A Developer
Questions
You can use lambda function, an example for 1D array:
import numpy as np a = [np.nan, 2, 3] map(lambda v:0 if np.isnan(v) == True else v, a)
This will give you the result:
[0, 2, 3]