Re: [Numpy-discussion] Change in behavior of np.concatenate for upcoming release

2012-09-12 Thread Nathaniel Smith
On Wed, Sep 12, 2012 at 2:46 PM, Matthew Brett wrote: > Hi, > > I just noticed that this works for numpy 1.6.1: > > In [36]: np.concatenate(([2, 3], [1]), 1) > Out[36]: array([2, 3, 1]) > > but the beta release branch: > > In [3]: np.concatenate(([2, 3], [1]), 1) >

Re: [Numpy-discussion] Change in behavior of np.concatenate for upcoming release

2012-09-13 Thread Matthew Brett
On Wed, Sep 12, 2012 at 4:19 PM, Nathaniel Smith wrote: > On Wed, Sep 12, 2012 at 2:46 PM, Matthew Brett > wrote: >> Hi, >> >> I just noticed that this works for numpy 1.6.1: >> >> In [36]: np.concatenate(([2, 3], [1]), 1) >> Out[36]: array([2, 3, 1]) >> >> but the beta release branch: >> >> In

Re: [Numpy-discussion] Change in behavior of np.concatenate for upcoming release

2012-09-13 Thread Matthew Brett
Hi, On Thu, Sep 13, 2012 at 11:31 AM, Matthew Brett wrote: > On Wed, Sep 12, 2012 at 4:19 PM, Nathaniel Smith wrote: >> On Wed, Sep 12, 2012 at 2:46 PM, Matthew Brett >> wrote: >>> Hi, >>> >>> I just noticed that this works for numpy 1.6.1: >>> >>> In [36]: np.concatenate(([2, 3], [1]), 1) >>>

Re: [Numpy-discussion] Change in behavior of np.concatenate for upcoming release

2012-09-13 Thread Travis Oliphant
>>> Yep, that'd be a good idea. Want to write a patch? :-) >> >> https://github.com/numpy/numpy/pull/440 > > Thinking about the other thread, and the 'number of elements' check, I > noticed this: > > In [51]: np.__version__ > Out[51]: '1.6.1' > > In [52]: r4 = range(4) > > In [53]: r3 = range(

Re: [Numpy-discussion] Change in behavior of np.concatenate for upcoming release

2012-09-14 Thread Matthew Brett
Hi, On Thu, Sep 13, 2012 at 7:00 PM, Matthew Brett wrote: > Hi, > > On Thu, Sep 13, 2012 at 11:31 AM, Matthew Brett > wrote: >> On Wed, Sep 12, 2012 at 4:19 PM, Nathaniel Smith wrote: >>> On Wed, Sep 12, 2012 at 2:46 PM, Matthew Brett >>> wrote: Hi, I just noticed that this wo

Re: [Numpy-discussion] Change in behavior of np.concatenate for upcoming release

2012-09-14 Thread Han Genuit
I think there is something wrong with the implementation.. I would expect each incoming array in PyArray_ConcatenateFlattenedArrays to be flattened and the sizes of all of them added into a one-dimensional shape. Now the shape is two-dimensional, which does not make sense to me. Also the requiremen

Re: [Numpy-discussion] Change in behavior of np.concatenate for upcoming release

2012-09-15 Thread Matthew Brett
Hi, On Fri, Sep 14, 2012 at 11:25 PM, Han Genuit wrote: > I think there is something wrong with the implementation.. I would > expect each incoming array in PyArray_ConcatenateFlattenedArrays to be > flattened and the sizes of all of them added into a one-dimensional > shape. Now the shape is two

Re: [Numpy-discussion] Change in behavior of np.concatenate for upcoming release

2012-09-15 Thread Han Genuit
Okay, sent in a pull request: https://github.com/numpy/numpy/pull/443. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Change in behavior of np.concatenate for upcoming release

2012-09-15 Thread Travis Oliphant
I was working on the same fix and so I saw your code was similar and merged it. It needs to be back-ported to 1.7.0 Thanks, -Travis On Sep 15, 2012, at 11:06 AM, Han Genuit wrote: > Okay, sent in a pull request: https://github.com/numpy/numpy/pull/443. >

Re: [Numpy-discussion] Change in behavior of np.concatenate for upcoming release

2012-09-15 Thread Han Genuit
Yeah, that merge was fast. :-) Regards, Han ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Change in behavior of np.concatenate for upcoming release

2012-09-15 Thread Travis Oliphant
It's very nice to get your help.I hope I haven't inappropriately set expectations :-) -Travis On Sep 15, 2012, at 3:14 PM, Han Genuit wrote: > Yeah, that merge was fast. :-) > > Regards, > Han > ___ > NumPy-Discussion mailing list > NumPy-Discuss

Re: [Numpy-discussion] Change in behavior of np.concatenate for upcoming release

2012-09-15 Thread Han Genuit
You're welcome. I do not have many expectations; only those you can expect from an open source project. ;-) On Sat, Sep 15, 2012 at 10:33 PM, Travis Oliphant wrote: > It's very nice to get your help.I hope I haven't inappropriately set > expectations :-) > > -Travis > > On Sep 15, 2012, at