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

Always unwrap factor values before use due to unfortunate interactions with numpy arrays. #241

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

matthewwardrop
Copy link
Owner

@matthewwardrop matthewwardrop commented Jan 9, 2025

Fixes: #232

I went down the rabbit hole a fair distance, but it looks like since both ObjectProxy and numpy array implementations are in C, that there is just some fundamental incompatibility with the numpy array constructors. We just unwrap them here in the few places that we actually require the ability to cast back to numpy arrays.

@matthewwardrop matthewwardrop merged commit 497b2f7 into main Jan 9, 2025
5 checks passed
@matthewwardrop matthewwardrop deleted the matthewwardrop/issue232 branch January 9, 2025 19:34
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.

FactorValues (ObjectProxy) wrappers do not behave as expected during pandas.Series construction
1 participant