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

Matthew Brett matthew.brett@gmail....
Thu Sep 13 05:31:29 CDT 2012


On Wed, Sep 12, 2012 at 4:19 PM, Nathaniel Smith <njs@pobox.com> wrote:
> On Wed, Sep 12, 2012 at 2:46 PM, Matthew Brett <matthew.brett@gmail.com> 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)
>> ---------------------------------------------------------------------------
>> IndexError                                Traceback (most recent call last)
>> /Users/mb312/<ipython-input-3-0fa244c8aaa8> in <module>()
>> ----> 1 np.concatenate(([2, 3], [1]), 1)
>>
>> IndexError: axis 1 out of bounds [0, 1)
>>
>> In the interests of backward compatibility maybe it would be better to
>> raise a warning for this release, rather than an error?
>
> Yep, that'd be a good idea. Want to write a patch? :-)

https://github.com/numpy/numpy/pull/440

Thanks,

Matthew


More information about the NumPy-Discussion mailing list