On Jan 7, 2008 2:00 PM, Charles R Harris <[EMAIL PROTECTED]> wrote:
> Hi,
>
> On Jan 7, 2008 1:16 PM, Timothy Hochberg <[EMAIL PROTECTED]> wrote:
>
> >
> > Another possible approach is to treat downcasting similar to underflow.
> > That is give it it's own flag in the errstate and people can set i
Hi,
On Jan 7, 2008 1:16 PM, Timothy Hochberg <[EMAIL PROTECTED]> wrote:
>
> Another possible approach is to treat downcasting similar to underflow.
> That is give it it's own flag in the errstate and people can set it to
> ignore, warn or raise on downcasting as desired. One could potentially hav
Hello all,
In order to help make things regarding this casting issue more
explicit, let me present the following table of potential "down-casts".
(Also, for the record, nobody is proposing automatic up-casting of
any kind. The proposals on the table focus on preventing some or all
implicit
On 07/01/2008, Timothy Hochberg <[EMAIL PROTECTED]> wrote:
> I'm fairly dubious about assigning float to ints as is. First off it looks
> like a bug magnet to me due to accidentally assigning a floating point value
> to a target that one believes to be float but is in fact integer. Second,
> C-sty
Another possible approach is to treat downcasting similar to underflow. That
is give it it's own flag in the errstate and people can set it to ignore,
warn or raise on downcasting as desired. One could potentially have two
flags, one for downcasting across kinds (float->int, int->bool) and one for
On Monday 07 January 2008 02:13:56 pm Charles R Harris wrote:
> On Jan 7, 2008 12:00 PM, Travis E. Oliphant <[EMAIL PROTECTED]>
wrote:
> > Charles R Harris wrote:
> > > Hi All,
> > >
> > > I'm thinking that one way to make the automatic type conversion a
> > > bit safer to use would be to add a CA
On Jan 7, 2008 12:00 PM, Travis E. Oliphant <[EMAIL PROTECTED]> wrote:
> Charles R Harris wrote:
> > 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[..
Charles R Harris wrote:
> 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
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 wh