Title: json converstion and numpy array · Issue #5340 · plotly/plotly.py · GitHub
Open Graph Title: json converstion and numpy array · Issue #5340 · plotly/plotly.py
X Title: json converstion and numpy array · Issue #5340 · plotly/plotly.py
Description: I recently updated NumPy to version 2.2.5 and Plotly to version 6.3.0. Since then, the JSON conversion has not been dealing with the NumPy array anymore. The x and y data are strange objects with no numerical values. The HTML conversion ...
Open Graph Description: I recently updated NumPy to version 2.2.5 and Plotly to version 6.3.0. Since then, the JSON conversion has not been dealing with the NumPy array anymore. The x and y data are strange objects with n...
X Description: I recently updated NumPy to version 2.2.5 and Plotly to version 6.3.0. Since then, the JSON conversion has not been dealing with the NumPy array anymore. The x and y data are strange objects with n...
Opengraph URL: https://github.com/plotly/plotly.py/issues/5340
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"json converstion and numpy array","articleBody":"I recently updated NumPy to version 2.2.5 and Plotly to version 6.3.0.\nSince then, the JSON conversion has not been dealing with the NumPy array anymore. The x and y data are strange objects with no numerical values. The HTML conversion do not show this issue.\n\nHere is some minimal code that generates the issue:\n``` python\nimport numpy as np\nimport plotly.graph_objects as go\n\nx = [1,5,4]\ny = [0,0,2]\n\nfig_array = go.Figure()\nfig_array.add_trace(go.Scatter(x=np.array(x),\n y=np.array(y),\n ))\nfig_array.write_json('test_array.json', pretty=True)\nfig_array.write_html('test.html')\n\nfig_list = go.Figure()\nfig_list.add_trace(go.Scatter(x=x,\n y=y,\n ))\nfig_list.write_json('test_list.json', pretty=True)\n```\n\nHere the obtained data fields in the json files.\n\n'test_list.json':\n``` json\n\"data\": [{\"x\": [1,5,4], \"y\": [0,0,2], \"type\": \"scatter\" }]\n```\n'test_array.json':\n``` json\n\"data\": [{ \"x\": {\"dtype\": \"i1\", \"bdata\": \"AQUE\"}, \"y\": { \"dtype\": \"i1\", \"bdata\": \"AAAC\"}, \"type\": \"scatter\" }]\n```\n\nThe html file is ok!","author":{"url":"https://github.com/AugustinErnoult","@type":"Person","name":"AugustinErnoult"},"datePublished":"2025-09-04T15:17:06Z","url":"https://github.com/plotly/plotly.py/issues/5340"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3f51a117-0ffc-4c44-d82d-28bd15de3995 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FE0:215B92:D22123:118BA93:6B01001F |
| html-safe-nonce | 8285353493bf6393c48944e142178116d23b65f130ecf230ec1b9872af3bddac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkUwOjIxNUI5MjpEMjIxMjM6MTE4QkE5Mzo2QjAxMDAxRiIsInZpc2l0b3JfaWQiOiI2MTUyOTQ0ODU2OTgyNDIxNTM1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 21426ee9713239fb25c132bb42573b9ffae86e680cde623c93812e0882d92f09 |
| hovercard-subject-tag | issue:3384228618 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/plotly.py/5340/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9b95cb6ab25e1e6ee3ac870d0afd929ff3f4e8ed6016bebb865aeded0e6ba180/plotly/plotly.py/issues/5340 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9b95cb6ab25e1e6ee3ac870d0afd929ff3f4e8ed6016bebb865aeded0e6ba180/plotly/plotly.py/issues/5340 |
| og:image:alt | I recently updated NumPy to version 2.2.5 and Plotly to version 6.3.0. Since then, the JSON conversion has not been dealing with the NumPy array anymore. The x and y data are strange objects with n... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AugustinErnoult |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.py git https://github.com/plotly/plotly.py.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 14579099 |
| octolytics-dimension-repository_nwo | plotly/plotly.py |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14579099 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.py |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width