[NumPy-Tickets] [NumPy] #1514: unique and NaN entries
NumPy Trac
numpy-tickets@scipy....
Fri Jun 18 16:17:04 CDT 2010
#1514: unique and NaN entries
------------------------+---------------------------------------------------
Reporter: rspringuel | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 2.0.0
Component: Other | Version: 1.4.0
Keywords: |
------------------------+---------------------------------------------------
Comment(by rspringuel):
Shoot, for got to use code blocks above. This only really affects the
patch-over code so I'll just repost that:
{{{
def nanunique(x):
a = numpy.unique(x)
r = []
for i in a:
if i in r or (numpy.isnan(i) and numpy.any(numpy.isnan(r))):
continue
else:
r.append(i)
return numpy.array(r)
}}}
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1514#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list