plotly / plotly/plotly.py

`Infinity` and `NaN` should be converted to `undefined` in JSON? Or base64 could/should be used to describe these values in the figure?

Open
#4,807 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P1
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

In #4470, the test_fast_track_finite_arrays, but it raised concerns that the replacement of NaN or Infinity with null in arrays is no longer running because the array is base64 encoded already when that code is run. The code that does the replacement currently is here

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/python/plotly/plotly/tests/test_optional/test_utils/test_utils.py, especially test_fast_track_finite_arrays, and trace the replacement logic in packages/python/plotly/_plotly_utils/utils.py. Determine whether non-finite values are encountered before or after base64 encoding, then establish the expected representation and add coverage showing that the chosen behavior is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.