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: Skip base64 conversion for empty arrays (fixes #4919) #4922

Merged
merged 4 commits into from
Dec 3, 2024
Merged

Conversation

emilykl
Copy link
Contributor

@emilykl emilykl commented Dec 2, 2024

Closes #4919

The error was caused by trying to take the min/max of an empty array.

The error only shows up when the empty array is typed, and is specifically a 'big int' type (int64 or uint64), because the min/max call only happens in those cases.

This PR:

  • Modifies to_typed_array_spec() function to just skip b64 encoding entirely in the case of an empty array
  • Adds tests for the scenario where an empty array of type int64 is passed into a figure (go and px). These tests fail on master but pass on this branch.

@marthacryan
Copy link
Collaborator

I think it might be a better solution to just not convert empty arrays to base64.

@gvwilson gvwilson added P1 needed for current cycle fix fixes something broken labels Dec 3, 2024
@emilykl emilykl changed the title fix: Handle dtype conversion for empty arrays (fixes #4919) fix: Skip base64 conversion for empty arrays (fixes #4919) Dec 3, 2024
@emilykl emilykl merged commit 43ac339 into master Dec 3, 2024
5 checks passed
@emilykl emilykl deleted the fix-4919 branch December 3, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix fixes something broken P1 needed for current cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception raised with empty dataframe in v6.0.0rc0
3 participants