You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR make use of this plotly.js PR and changes the default behavior to pass numpy arrays as plotly.js base64 spec.
Code Changes
Adds to_typed_array_spec function to use for converting numpy arrays to the "typed array spec" type that plotly.js expects when receiving base64 encoded arrays.
Updates the validate_coerce function of the DataArrayValidator class to base64 encode numpy arrays and store them in the "typed array spec" format (by calling to_typed_array_spec)
- Removes a speed comparison that is no longer needed because the base64 encoding makes it faster
- Updates a test to use numpy arrays to account for plotly express automatically converting numerical lists to pandas arrays.
- Remove unnecessary enumerate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR make use of this plotly.js PR and changes the default behavior to pass numpy arrays as plotly.js base64 spec.
Code Changes
to_typed_array_specfunction to use for converting numpy arrays to the "typed array spec" type that plotly.js expects when receiving base64 encoded arrays.validate_coercefunction of theDataArrayValidatorclass to base64 encode numpy arrays and store them in the "typed array spec" format (by callingto_typed_array_spec)