Skip to content
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

Please Deprecate creation of numpy arrays for arbitrary objects. #6070

Open
ChrisBarker-NOAA opened this issue Jul 12, 2015 · 1 comment
Open

Comments

@ChrisBarker-NOAA
Copy link
Contributor

NOTE: as discussed at SciPy2015 -- just thought I'd get an issue in.

numpy currently will default to making an dtype-object array for anything it can't make other sense of.

This is hardly ever what someone would want. For example, I just banged my head against a bug due to this:

In [5]: np.array(object)
Out[5]: array(<type 'object'>, dtype=object)

Granted, due to a stupid typo -- but why would anyone want this?

When a user does want the object dtype, numpy almost never can get it right by default anyway, so it's not much burden to have to specify the object dtype if you really want that.

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

2 participants