On 7/18/06, Alan G Isaac <[EMAIL PROTECTED]> wrote:
> it cannot upcast, as the '+=' operation will use only the
> memory initially allocated for a.

Not true:

>>> x = [2,3]
>>> x += array(2)
>>> type(x)
<type 'numpy.ndarray'>

This is just the design choice made by numpy.

I don't see the need for an error.  Augmented assignment is a
sufficiently advanced
feature that those who use it can be expected to know what it does.
Loosing imaginary part maybe a more compelling reason for an error
than loosing precision, but it would be clearly wrong to have
different types behave differently.  Silent downcasting from float to
int is actually a useful feature.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to