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

REF: implement get_unit_from_dtype #46410

Merged
merged 2 commits into from
Mar 18, 2022

Conversation

jbrockmendel
Copy link
Member

Finding I need this in a bunch of non-nano branches.

cpplint gave a warning I didn't know what to do with so ignored; pls advise.

pandas/_libs/tslibs/src/datetime/np_datetime.c:787:  Are you taking an address of a cast?  This is dangerous: could be a temp var.  Take the address before doing the cast, rather than after  [runtime/casting] [4]

@mattip would this be a good candidate for adding to numpy's __init__.pxd?

@jbrockmendel jbrockmendel added the Non-Nano datetime64/timedelta64 with non-nanosecond resolution label Mar 18, 2022
@jreback jreback added this to the 1.5 milestone Mar 18, 2022
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm cc @mroeschke

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I guess if the cpplint warning can't be address in the near team might be good to inline a comment if it becomes a problem in the future

@jbrockmendel
Copy link
Member Author

I guess if the cpplint warning can't be address in the near team

should have mentioned, fixed that in a subsequent commit, so we're all good.

@mroeschke mroeschke merged commit 55d1aca into pandas-dev:main Mar 18, 2022
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the ref-unit-from-dtype branch March 18, 2022 20:35
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
* REF: implement get_unit_from_dtype

* avoid cpplint complaint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Non-Nano datetime64/timedelta64 with non-nanosecond resolution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants