[Numpy-discussion] Choosing the lesser value

nathanielpeterson08@gmai... nathanielpeterson08@gmai...
Mon Sep 7 15:06:49 CDT 2009


Doh,

x=np.column_stack([a,b])
r=np.ma.masked_invalid(np.nanmin(x,axis=1))
print(r)
# [-2.0 -3.0 -2.0 -3.0 --]



More information about the NumPy-Discussion mailing list