Skip to content
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

Fix issue #47101 #59766

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Fix issue #47101 #59766

wants to merge 4 commits into from

Conversation

tigerhawkvok
Copy link

Reapplies PR #59492

See #59492 (comment)


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

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

Patch takes two tracks -- it first replaces the arr == x with np.equals() which will handle broadcasting in most cases by itself. For the remainder of cases, an explicit type check is done to return an array for the mask.


Has a KNOWN test failure of

ruff-format.............................................................................................Failed
- hook id: ruff-format
- files were modified by this hook

but I honestly have no clue what's failing in that. Some inscrutable and poorly reported style problem?

* 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
tigerhawkvok and others added 3 commits September 9, 2024 13:31
…ring_array (pandas-dev#59756) (#2)

* BUG (string dtype): fix inplace mutation with copy=False in ensure_string_array

* update

Co-authored-by: Joris Van den Bossche <[email protected]>
Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Oct 10, 2024
@tigerhawkvok
Copy link
Author

tigerhawkvok commented Oct 10, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
1 participant