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

Call .astype(int) on .as_numpy_array() result #2383

Merged
merged 13 commits into from
Apr 6, 2023
Merged

Call .astype(int) on .as_numpy_array() result #2383

merged 13 commits into from
Apr 6, 2023

Conversation

rjgildea
Copy link
Contributor

@rjgildea rjgildea commented Apr 5, 2023

Without this, on Windows, the underlying dtype.type is np.intc rather than np.int32 or np.int64, which results in an error when calling pd.merge as the type np.intc is missing from the following lookup table in pandas 2.0.0:

https://github.com/pandas-dev/pandas/blob/3ce07cb46986ce59427b601c6878c81633e436eb/pandas/core/reshape/merge.py#L108-L124

Fixes #2382

@rjgildea rjgildea requested a review from ndevenish April 5, 2023 16:29
@codecov
Copy link

codecov bot commented Apr 5, 2023

Codecov Report

Merging #2383 (19674b6) into main (9b4112b) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

❗ Current head 19674b6 differs from pull request most recent head e13fb8a. Consider uploading reports for the commit e13fb8a to get more accurate results

@@            Coverage Diff             @@
##             main    #2383      +/-   ##
==========================================
- Coverage   78.53%   78.50%   -0.04%     
==========================================
  Files         602      602              
  Lines       73372    73373       +1     
  Branches     9964     9964              
==========================================
- Hits        57622    57599      -23     
- Misses      13626    13650      +24     
  Partials     2124     2124              

rjgildea and others added 3 commits April 6, 2023 09:46
This reverts commit a6eaca1.

flumpy.to_numpy(<flex_int>) generates an array with dtype=np.intc on Windows
@ndevenish
Copy link
Member

dcd34b1 is identical to the current codestate and passed.

@ndevenish ndevenish enabled auto-merge (squash) April 6, 2023 12:23
@ndevenish ndevenish disabled auto-merge April 6, 2023 12:24
@ndevenish ndevenish merged commit bfdd933 into main Apr 6, 2023
4 of 6 checks passed
@ndevenish ndevenish deleted the 2382 branch April 6, 2023 12:24
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.

test_match_by_hkle failure with pandas 2.0.0 on Windows
3 participants