[SciPy-user] ediff1d and NaN's
pgmdevlist at gmail.com
Sat Jan 6 22:15:56 CST 2007
On Saturday 06 January 2007 22:51, v-nijs at kellogg.northwestern.edu wrote:
> In the code for ediff1d, to_end, append() is used which up-casts the array.
> In the code for to_begin, insert() is used which does not up-cast the
Indeed. `append` calls `concatenate`, which will create a new array and will
use the largest dtype (in your example, float).
I was thinking about how to code it for maskedarray, and was naturally going
for creating an empty array and filling it as needed. In that case, the
result would have the same dtype as the initial array, no matter what you
precise for to_bgin/to_end.
Should that be the case ?
More information about the SciPy-user