On 1/18/07, Keith Goodman <[EMAIL PROTECTED]> wrote:
> On 1/18/07, Robert Kern <[EMAIL PROTECTED]> wrote:
> > Yes. 1.2 is not an integer. In Emanuele's example, a.sum() was an integer,
> > though not an int.
>
> Sorry, but I'm still confused. Does that mean that this is the
> expected behaviour?
>
On 1/18/07, Robert Kern <[EMAIL PROTECTED]> wrote:
> Yes. 1.2 is not an integer. In Emanuele's example, a.sum() was an integer,
> though not an int.
Sorry, but I'm still confused. Does that mean that this is the
expected behaviour?
>> numpy.random.permutation(1)
array([0])
whereas
>> numpy.rand
Keith Goodman wrote:
> On 1/18/07, Robert Kern <[EMAIL PROTECTED]> wrote:
>> Keith Goodman wrote:
>>> I don't think that bug is particular to int32. For example:
>>>
> numpy.random.permutation(1.2)
>>> TypeError: len() of unsized object
>> Well, that should raise an error, though maybe not that
On 1/18/07, Robert Kern <[EMAIL PROTECTED]> wrote:
> Keith Goodman wrote:
> > I don't think that bug is particular to int32. For example:
> >
> >>> numpy.random.permutation(1.2)
> > TypeError: len() of unsized object
>
> Well, that should raise an error, though maybe not that error.
Is my example
Robert Kern wrote:
> Emanuele Olivetti wrote:
>
>
>> permutation() likes 'int' and dislikes 'numpy.int32' integers :(
>> Seems a bug.
>>
>
> Yup. I should get around to fixing it later tonight.
>
>
Wow. Superfast! :)
Emanuele
___
Numpy-discus
Emanuele Olivetti wrote:
> permutation() likes 'int' and dislikes 'numpy.int32' integers :(
> Seems a bug.
Yup. I should get around to fixing it later tonight.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad atte
Keith Goodman wrote:
> I don't think that bug is particular to int32. For example:
>
>>> numpy.random.permutation(1.2)
> TypeError: len() of unsized object
Well, that should raise an error, though maybe not that error.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a
Confirmed for numpy 1.0.
Cheers,
Alan Isaac
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
On 1/18/07, Emanuele Olivetti <[EMAIL PROTECTED]> wrote:
> Look at this:
>
> --bug.py---
> import numpy
> a=numpy.array([1,2])
> b=a.sum()
> print type(b)
> c=numpy.random.permutation(b)
> ---
>
> If I run it (Python 2.5, numpy 1.0.1 on a Linux box) I get:
>
Look at this:
--bug.py---
import numpy
a=numpy.array([1,2])
b=a.sum()
print type(b)
c=numpy.random.permutation(b)
---
If I run it (Python 2.5, numpy 1.0.1 on a Linux box) I get:
---
#> python /tmp/bug.py
Traceback (most recent call last):
File "/tmp/bug.
10 matches
Mail list logo