-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Use plotly.js base64
API to store and pass typed arrays declared by numpy, pandas, etc.
#4470
Open
archmoj
wants to merge
107
commits into
master
Choose a base branch
from
pass-b64
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
LiamConnors
reviewed
Jan 11, 2024
Co-authored-by: Liam Connors <[email protected]>
LiamConnors
reviewed
Jan 17, 2024
doc/python/b64.md
Outdated
version: 3.9.0 | ||
plotly: | ||
description: How to format axes of 3d plots in Python with Plotly. | ||
display_as: b64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
display_as: b64 | |
display_as: advanced_opt |
I think we could put this in the Advanced section
doc/python/b64.md
Outdated
permalink: python/b64/ | ||
thumbnail: thumbnail/b64.png | ||
--- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some context on the benefits of doing this. What does it bring for the user?
- fixed Conflicts in packages/python/plotly/plotly/tests/test_optional/test_figure_factory/test_figure_factory.py packages/python/plotly/plotly/tests/test_optional/test_px/test_px_input.py
6 tasks
…bjs/test_skipped_b64_keys.py Co-authored-by: Mojtaba Samimi <[email protected]>
Add tests for the keys that should be skipped in base64 conversion
(Closed and reopened to kick CI) |
marthacryan
approved these changes
Sep 4, 2024
We decided that the documentation on base64 wouldn't be as clear because most people wouldn't understand what we mean by base64. Instead, we're going to make documentation on usage of numpy arrays.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_spec
function to use for converting numpy arrays to the "typed array spec" type that plotly.js expects when receiving base64 encoded arrays.validate_coerce
function of theDataArrayValidator
class to base64 encode numpy arrays and store them in the "typed array spec" format (by callingto_typed_array_spec
)