[Numpy-discussion] Medians that ignore values

Alan G Isaac aisaac@american....
Fri Sep 19 11:34:46 CDT 2008


On 9/19/2008 12:02 PM Peter Saffrey apparently wrote:
> >>> a = array([1,2,nan])
> >>> nan in a
> False

Huh.  I'm inclined to call this a bug,
since normal Python behavior is that
``in`` should check for identity::

	>>> xl = [1.,np.nan]
	>>> np.nan in xl
	True

Alan



More information about the Numpy-discussion mailing list