Re: [Numpy-discussion] numpy oddity

2011-08-30 Thread Johann Cohen-Tanugi
ok thanks a lot. Safe code is often better than over-smart code, so I would line up with Charles here. There is too much potential for ambiguity in expected behavior. Johann On 08/30/2011 09:06 PM, Robert Kern wrote: > On Tue, Aug 30, 2011 at 13:58, Johann Cohen-Tanugi > wrote: >> I am not sur

Re: [Numpy-discussion] numpy oddity

2011-08-30 Thread Robert Kern
On Tue, Aug 30, 2011 at 13:58, Johann Cohen-Tanugi wrote: > I am not sure I follow : is the problem the coerce-sequences-to-ndarrays > behavior, or is it the fact that it applies to division and not > multiplication? > I thought the second situation is the more problematic. > Anyway, you seem to t

Re: [Numpy-discussion] numpy oddity

2011-08-30 Thread Johann Cohen-Tanugi
I am not sure I follow : is the problem the coerce-sequences-to-ndarrays behavior, or is it the fact that it applies to division and not multiplication? I thought the second situation is the more problematic. Anyway, you seem to take it as a bug, should I file a ticket somewhere? thanks, johann

Re: [Numpy-discussion] numpy oddity

2011-08-30 Thread Robert Kern
On Tue, Aug 30, 2011 at 09:52, Charles R Harris wrote: > > On Tue, Aug 30, 2011 at 8:33 AM, Johann Cohen-Tanugi > wrote: >> >> I have numpy version 1.6.1 and I see the following behavior : >> >> In [380]: X >> Out[380]: 1.0476157527896641 >> >> In [381]: X.__class__ >> Out[381]: numpy.float64 >>

Re: [Numpy-discussion] numpy oddity

2011-08-30 Thread Olivier Delalleau
2011/8/30 Charles R Harris > > > On Tue, Aug 30, 2011 at 8:33 AM, Johann Cohen-Tanugi < > johann.cohentan...@gmail.com> wrote: > >> I have numpy version 1.6.1 and I see the following behavior : >> >> In [380]: X >> Out[380]: 1.0476157527896641 >> >> In [381]: X.__class__ >> Out[381]: numpy.float6

Re: [Numpy-discussion] numpy oddity

2011-08-30 Thread Charles R Harris
On Tue, Aug 30, 2011 at 8:33 AM, Johann Cohen-Tanugi < johann.cohentan...@gmail.com> wrote: > I have numpy version 1.6.1 and I see the following behavior : > > In [380]: X > Out[380]: 1.0476157527896641 > > In [381]: X.__class__ > Out[381]: numpy.float64 > > In [382]: (2,3)*X > Out[382]: (2, 3) >

[Numpy-discussion] numpy oddity

2011-08-30 Thread Johann Cohen-Tanugi
I have numpy version 1.6.1 and I see the following behavior : In [380]: X Out[380]: 1.0476157527896641 In [381]: X.__class__ Out[381]: numpy.float64 In [382]: (2,3)*X Out[382]: (2, 3) In [383]: (2,3)/X Out[383]: array([ 1.90909691, 2.86364537]) In [384]: X=float(X) In [385]: (2,3)/X