Skip to content

Solidify blobs dtype inference - #363

Merged
dfm merged 5 commits into
dfm:mainfrom
aarchiba:blobs
Sep 19, 2020
Merged

dfm merged 5 commits into
dfm:mainfrom
aarchiba:blobs

Conversation

@aarchiba

Copy link
Copy Markdown
Contributor

Reduce the chance of user surprise due to blob dtype inference - strings are object dtypes, object dtypes don't lead to backend weirdness, ragged blob dtypes raise numpy.VisibleDeprecationWarning unless blobs_dtype is specified. Also fixes problems where grow used to re-infer blob dtypes.

Closes #361

Comment thread src/emcee/tests/unit/test_blobs.py Resolved
@dfm

dfm commented Aug 27, 2020

Copy link
Copy Markdown
Owner

This looks great!

Like you suggested in #361, perhaps we should catch the cases where this deprecation hits and a user hasn't provided a blobs_dtype and provide a recommendation? Happy to merge this and open a separate issue if you think that's best.

Thanks!!

@aarchiba

Copy link
Copy Markdown
Contributor Author

https://numpy.org/neps/nep-0034-infer-dtype-is-object.html specifies the deprecation process, so the same change should allow transforming the ValueError into a more informative one as well, for users with a whiz-bang future version of numpy that does that.

@aarchiba

aarchiba commented Sep 2, 2020

Copy link
Copy Markdown
Contributor Author

Ready for review.

@dfm

dfm commented Sep 10, 2020

Copy link
Copy Markdown
Owner

Sorry I've been slow to respond - this week has been crazy! I'll get back here in the next few days.

@dfm

dfm commented Sep 19, 2020

Copy link
Copy Markdown
Owner

Sorry about the delay! I think this looks great and I'm happy to merge. Thanks for this! I'll start a new pull request thread to draft a new release.

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

Successfully merging this pull request may close these issues.

Emits numpy deprecation warning about ragged sequences

2 participants