Skip to content

fix nightly build with Series.to_numpy() on a Timedelta series #500

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

Merged
merged 2 commits into from
Jan 7, 2023

Conversation

Dr-Irv
Copy link
Collaborator

@Dr-Irv Dr-Irv commented Jan 7, 2023

Just made the test depend on the pandas version

Either @twoertwein or @bashtage can review, approve or merge. Both approvals not needed.

@Dr-Irv Dr-Irv requested review from bashtage and twoertwein January 7, 2023 01:50
check(assert_type(td_s.to_numpy(na_value=0), np.ndarray), np.ndarray)
else:
check(
assert_type(td_s.to_numpy(na_value=pd.Timedelta(0)), np.ndarray), np.ndarray
Copy link
Member

Choose a reason for hiding this comment

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

Can we always use the else case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can we always use the else case?

I tried that, and it didn't work, but now I tried again, and it did work! Must have done something wrong the first time.

Fixed in commit #c93d157

@twoertwein twoertwein merged commit 2a56b4d into pandas-dev:main Jan 7, 2023
@twoertwein
Copy link
Member

Thanks @Dr-Irv !

@Dr-Irv Dr-Irv deleted the issue499 branch February 4, 2023 17:05
twoertwein pushed a commit to twoertwein/pandas-stubs that referenced this pull request Apr 1, 2023
…s-dev#500)

* fix nightly build with Series.to_numpy() on a Timedelta series

* just use Timedelta(0)
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.

nightly failing due to timedelta and NA values
2 participants