Skip to content

TST: Added test for bug Reindexing pd.Float64Dtype() series gives runtime warnings when passed to np.log #47087

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 8 commits into from
Jun 8, 2022

Conversation

MiloniAtal
Copy link
Contributor

@MiloniAtal MiloniAtal commented May 21, 2022

@simonjayhawkins simonjayhawkins added Testing pandas testing functions or related to the test suite Warnings Warnings that appear or should be added to pandas labels Jun 3, 2022
def test_reindexing_values():
# GH 47055
s = Series([1.0, NA], dtype=Float64Dtype())
s_reindex = s.reindex(range(3))
Copy link
Member

Choose a reason for hiding this comment

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

  1. Could you move this test to pandas/tests/series/methods/test_reindex.py?
  2. Could you mention in the test name that it involves Float64 with NA?
  3. Could you also test that a warning isnt raised like
tm.assert_produces_warning(None):
    result = np.log(s_reindex)
    expected = ...

@mroeschke mroeschke merged commit d3d1bdc into pandas-dev:main Jun 8, 2022
@mroeschke
Copy link
Member

Thanks @MiloniAtal

yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
…time warnings when passed to np.log (pandas-dev#47087)

* TST: For issue GH 47055

* Changes according to pre-commit

* Made changes according to review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite Warnings Warnings that appear or should be added to pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Reindexing pd.Float64Dtype() series gives runtime warnings when passed to np.log
3 participants