[Numpy-discussion] Generically Creating Intermediate Data Compatible with Either ndarray or MasledArray Types

Hans Meine meine at informatik.uni-hamburg.de
Tue Apr 8 04:21:41 EDT 2008


Am Dienstag, 11. März 2008 20:57:30 schrieb Alexander Michael:
> Incidentally, while ones_like appears to play nice with derived
> classes, empty_like and zeros_like do not seem to do the same.

Shouldn't this be fixed?  (Obviously, this stems from the fact that ones_like 
is implemented in C, while the two others are helpers by fperez copied over 
from IPython.)

Maybe using Robert's suggestion?  (Patch attached.)  Or implement them all the 
same?

-- 
Ciao, /  /
     /--/
    /  / ANS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: numpy_xxx_like_preserve_type.diff
Type: text/x-diff
Size: 722 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080408/cecd0223/attachment.diff>


More information about the NumPy-Discussion mailing list