-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
datetimelike indexes add/sub zero-dim integer arrays #19013
Conversation
pandas/core/dtypes/inference.py
Outdated
@@ -24,6 +24,22 @@ | |||
is_interval = lib.is_interval | |||
|
|||
|
|||
def is_zero_dim_array(obj): | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this already exists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have item_from_zerodim
. so need to reconcile this. you generally don't need to actually check, rather you just unbox.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In [4]: pd.api.types.is_scalar(np.int64(1))
Out[4]: True
Wow, yah, just calling |
Codecov Report
@@ Coverage Diff @@
## master #19013 +/- ##
==========================================
+ Coverage 91.55% 91.57% +0.02%
==========================================
Files 150 150
Lines 48939 48941 +2
==========================================
+ Hits 44805 44817 +12
+ Misses 4134 4124 -10
Continue to review full report at Codecov.
|
thanks! |
Setup:
0.21.1:
Master: (See #19011)
After
git diff upstream/master -u -- "*.py" | flake8 --diff