[Numpy-discussion] ANN: NumPy 1.7.0b2 release

Frédéric Bastien nouiz@nouiz....
Mon Sep 24 15:25:44 CDT 2012


Hi,

I tested this new beta on Theano and discovered an interface change
that was not there in the beta 1.

New behavior:
numpy.ndindex().next()
(0,)

Old behavior:
numpy.ndindex().next()
()

This break some Theano code that look like this:

import numpy
shape=()
out_shape=[12]
random_state=numpy.random.RandomState()

out = numpy.zeros(out_shape, int)
for i in numpy.ndindex(*shape):
    out[i] = random_state.permutation(5)


I suppose this is an regression as the only mention of ndindex in the
first email of this change is that it is faster.




There is a second "regression" in ndindex This was working in the
past, but it raise an ValueError now:

numpy.ndindex((2,1,1,1))

But If I call numpy.ndindex(2,1,1,1)

The documentation[1] do not talk about receiving a tuple as input. I
already make a commit to change Theano code to make it work. But this
could break other people code. It is up to you to decide if you want
this, but a warning in the release note would be great to help people
know that the old not documented behavior changed.

Do you know if the first change is expected? This will probably cause
bad results in some people code if you intended this change.

Fred

[1] http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndindex.html


On Thu, Sep 20, 2012 at 3:51 PM, Ondřej Čertík <ondrej.certik@gmail.com> wrote:
> On Thu, Sep 20, 2012 at 12:00 PM, Nathaniel Smith <njs@pobox.com> wrote:
>> On Thu, Sep 20, 2012 at 3:33 PM, Ondřej Čertík <ondrej.certik@gmail.com> wrote:
>>> On Thu, Sep 20, 2012 at 4:50 AM, Richard Hattersley
>>> <rhattersley@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> [First of all - thanks to everyone involved in the 1.7 release. Especially
>>>> Ondřej - it takes a lot of time & energy to coordinate something like this.]
>>>>
>>>> Is there an up to date release schedule anywhere? The trac milestone still
>>>> references June.
>>>
>>> Well, originally we were supposed to release about a month ago, but it
>>> turned out there are more things to fix.
>>> Currently, we just need to fix all the issues here:
>>>
>>> https://github.com/numpy/numpy/issues/396
>>>
>>> it looks like a lot, but many of them are really easy to fix, so my
>>> hope is that it will not take long. The hardest one is this:
>>>
>>> http://projects.scipy.org/numpy/ticket/2108
>>>
>>> if anyone wants to help with this one, that'd be very much appreciated.
>>
>> This particular bug should actually be pretty trivial to fix if anyone
>> is looking for something to do (esp. if you have a working win32 build
>> environment to test your work):
>>   http://thread.gmane.org/gmane.comp.python.numeric.general/50950/focus=50980
>
> Ah, that looks easy. I'll try to give it a shot. See my repo here how
> to get a working win32 environment:
>
> https://github.com/certik/numpy-vendor
>
> However, I don't have access to MSVC, but I am sure somebody else can
> test it there, once the PR is ready.
>
> Ondrej
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion


More information about the NumPy-Discussion mailing list