Skip to content

Conversation

@simonjayhawkins
Copy link
Member

@simonjayhawkins simonjayhawkins added Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Regression Functionality that used to work in a prior pandas version labels Aug 30, 2022
@simonjayhawkins simonjayhawkins added this to the 1.4.4 milestone Aug 30, 2022
if not isinstance(new_mask, np.ndarray):
# GH#47101 we may get a scalar new_mask if elementwise comparison fails
with warnings.catch_warnings():
warnings.simplefilter("ignore", FutureWarning)
Copy link
Member

Choose a reason for hiding this comment

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

is there a condition under which we can remove this check?

Copy link
Member Author

Choose a reason for hiding this comment

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

I assume when the numpy behaviour changes and a FutureWarning is no longer given.

Copy link
Member Author

Choose a reason for hiding this comment

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

Note: the warning was not being suppressed in 1.3.5 so not strictly needed for the regression fix.

@simonjayhawkins
Copy link
Member Author

closing so can start release tomorrow

tigerhawkvok added a commit to tigerhawkvok/pandas that referenced this pull request Aug 12, 2024
Bisecting two years ago ( pandas-dev#47101 (comment) ) shows this regression was introduced in b2d54d9 in 2021. Somehow this hasn't been patched since then.

PR pandas-dev#48313 was supposed to address this, but the PR was closed and never merged and the bug has persisted.
@tigerhawkvok tigerhawkvok mentioned this pull request Aug 12, 2024
5 tasks
tigerhawkvok added a commit to tigerhawkvok/pandas that referenced this pull request Sep 9, 2024
* Fix issue pandas-dev#47101

Bisecting two years ago ( pandas-dev#47101 (comment) ) shows this regression was introduced in b2d54d9 in 2021. Somehow this hasn't been patched since then.

PR pandas-dev#48313 was supposed to address this, but the PR was closed and never merged and the bug has persisted.

* Add a test as per PR guidelines

* Fix typo

* Resolve inconsistent namespace as per PR test

https://results.pre-commit.ci/run/github/858127/1723498369.6V12SWx7T-WpLZDAXXkz0Q

This web UI commit will still fail, as the E501 line-too-long check will fail until the next commit

* Resolve E501 linting errors

https://results.pre-commit.ci/run/github/858127/1723498369.6V12SWx7T-WpLZDAXXkz0Q

* Fix test TypeErrors

np.equal([1,2,3], "") fails

* Quote style for Ruff

* typing and remove code backtick possibly incorrectly triggering ruff formatter

* mpy supression for caught error

* trailing space
@tigerhawkvok tigerhawkvok mentioned this pull request Sep 9, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Regression Functionality that used to work in a prior pandas version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: AttributeError: 'bool' object has no attribute 'to_numpy' in "mask_missing" method of core/missing.py

2 participants