-
-
Notifications
You must be signed in to change notification settings - Fork 145
feat: #1300 concat Series with dtype #1302
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
feat: #1300 concat Series with dtype #1302
Conversation
tests/test_frame.py
Outdated
@@ -2523,8 +2523,8 @@ def test_types_regressions() -> None: | |||
ts1 = pd.concat([s1, s2], axis=0) | |||
ts2 = pd.concat([s1, s2]) | |||
|
|||
check(assert_type(ts1, pd.Series), pd.Series) | |||
check(assert_type(ts2, pd.Series), pd.Series) | |||
check(assert_type(ts1, "pd.Series[int]"), pd.Series, np.int64) |
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 general I would recommend using np.integer
, np.floating
and np.complexfloating
in those instances since those types are a little wider and don't rely only on 16/32/64 bits (same in the other places you have modified).
The rest looks good to me.
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.
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.
one small change
https://github.com/pandas-dev/pandas-stubs/pull/1302/files#r2248094383 Co-authored-by: Irv Lustig <[email protected]>
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.
Thanks @cmp0xff
Thanks @loicdiridollou for the idea and @Dr-Irv for the review 😄 |
* feat(series): #1098 arithmetic truediv * fix(typing): __truediv__ * fix(typing): truediv * fix(typing): __rtruediv__ and rtruediv * fix(typing): div and rdiv * fix(comment): ordering #1280 (review) * fix(comment): #1302 (comment) * fix(typing): truediv path * fix(comment): ordering #1280 (review)
Taking @loicdiridollou's idea from #1300 (comment)
assert_type()
to assert the type of any return value