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

COMPAT: alias .to_numpy() for scalars #24653

Closed
jreback opened this issue Jan 6, 2019 · 4 comments

Comments

@jreback
Copy link
Contributor

commented Jan 6, 2019

I think we achieve a bit more consistency in our interfaces if we alias .to_numpy() to .to_datetime64() and .to_timedelta64() for Timedelta and Timestamp respectively.

xref https://github.com/pandas-dev/pandas/pull/24486/files#diff-26a6d2ca7adfca586aabbb1c9dd8bf36L235

@jbrockmendel

This comment has been minimized.

Copy link
Member

commented Jan 6, 2019

Could do the same for to_py, I think arrow does this

@jreback

This comment has been minimized.

Copy link
Contributor Author

commented Jan 6, 2019

yep

@cbertinato

This comment has been minimized.

Copy link
Contributor

commented Jan 27, 2019

What should we do for the to_numpy() keyword arguments? Neither dtype nor copy make sense in the case of a scalar. Just let it raise the TypeError if either is passed, or accept the arguments and do nothing?

@jreback

This comment has been minimized.

Copy link
Contributor Author

commented Jan 27, 2019

i think it’s ok to have them i. the signature for compatibility (default to None); but they will be ignored

@cbertinato cbertinato referenced this issue Feb 4, 2019
4 of 4 tasks complete

@jreback jreback modified the milestones: Contributions Welcome, 0.25.0 Feb 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.