Skip to content

regression in np.concatenate with object dtypes in 1.10 #6014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jreback opened this issue Jun 24, 2015 · 5 comments
Closed

regression in np.concatenate with object dtypes in 1.10 #6014

jreback opened this issue Jun 24, 2015 · 5 comments

Comments

@jreback
Copy link

jreback commented Jun 24, 2015

This was working as of this commit: 1.10.0.dev0+95b2c24 (and in 1.9.2), so just broken very recently

In [1]: np.__version__
Out[1]: '1.10.0.dev0+3d2b8ca'

In [3]: np.concatenate([np.array(['a','b'],dtype=object),np.array(['a','b'],dtype=object)],axis=1)
IndexError: axis 1 out of bounds [0, 1)
In [3]:  np.concatenate([np.array(['a','b'],dtype=object),np.array(['a','b'],dtype=object)],axis=1)
Out[3]: array(['a', 'b', 'a', 'b'], dtype=object)

In [4]: np.__version__
Out[4]: '1.9.2'
@charris
Copy link
Member

charris commented Jun 24, 2015

The axis=1 has been deprecated for 1-D arrays for years, we just made is an error instead of a warning ;) Use axis=0 (or default) instead.

@charris
Copy link
Member

charris commented Jun 24, 2015

For instance, in 1.9.2

n [1]: import warnings

In [2]: warnings.simplefilter('always')

In [3]: a = np.array(['a','b'],dtype=object)

In [4]: concatenate([a, a], axis=1)
/home/charris/.local/bin/ipython:1: DeprecationWarning: axis != 0 for ndim == 1; this will raise an error in future versions of numpy
  #!/usr/bin/python
Out[4]: array(['a', 'b', 'a', 'b'], dtype=object)

@jreback
Copy link
Author

jreback commented Jun 24, 2015

hmm you must have just changed this yes?
ok then I'll fix this up then

@jreback jreback closed this as completed Jun 24, 2015
@charris
Copy link
Member

charris commented Jun 24, 2015

Yep. It's been deprecated since 2012-09-13. I don't know if it made it into the 1.7 release or not, that was a confusing period. If not, the message is only 1 3/4 years old, so maybe borderline for deprecation removal.

@jreback
Copy link
Author

jreback commented Jun 24, 2015

no that's fine
I on purpose have depreciations fail but only for testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants