[Numpy-discussion] CASTABLE flag

Charles R Harris charlesr.harris@gmail....
Mon Jan 7 12:54:47 CST 2008


Hi All,

I'm thinking that one way to make the automatic type conversion a bit safer
to use would be to add a CASTABLE flag to arrays. Then we could write
something like

a[...] = typecast(b)

where typecast returns a view of b with the CASTABLE flag set so that the
assignment operator can check whether to implement the current behavior or
to raise an error. Maybe this could even be part of the dtype scalar,
although that might cause a lot of problems with the current default
conversions. What do folks think?

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080107/b06827aa/attachment.html 


More information about the Numpy-discussion mailing list