Title: Grid.new fails if 1D array provided · Issue #883 · simvue-io/python-api · GitHub
Open Graph Title: Grid.new fails if 1D array provided · Issue #883 · simvue-io/python-api
X Title: Grid.new fails if 1D array provided · Issue #883 · simvue-io/python-api
Description: Description of Bug If trying to create a grid for a 2D metric by providing a 1D array of ticks, it fails validation. Steps To Reproduce Code to reproduce the behavior: import simvue import numpy with simvue.Run() as run: run.init("test")...
Open Graph Description: Description of Bug If trying to create a grid for a 2D metric by providing a 1D array of ticks, it fails validation. Steps To Reproduce Code to reproduce the behavior: import simvue import numpy wi...
X Description: Description of Bug If trying to create a grid for a 2D metric by providing a 1D array of ticks, it fails validation. Steps To Reproduce Code to reproduce the behavior: import simvue import numpy wi...
Opengraph URL: https://github.com/simvue-io/python-api/issues/883
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Grid.new fails if 1D array provided","articleBody":"## Description of Bug\nIf trying to create a grid for a 2D metric by providing a 1D array of ticks, it fails validation.\n\n## Steps To Reproduce\nCode to reproduce the behavior:\n```\nimport simvue\nimport numpy\n\nwith simvue.Run() as run:\n run.init(\"test\")\n run.assign_metric_to_grid(metric_name=\"test_metric_2d\", axes_ticks=numpy.arange(10), axes_labels=['x'])\n for i in range(10):\n run.log_metrics({\"test_metric_2d\": numpy.random.rand(10)}, time=i, step=i)\n```\n## Expected behavior\nGrid added correctly\n\n## Actual Behaviour\n```\nTraceback (most recent call last):\n File \"/home/wk9874/Documents/simvue/python-api/test_retrieval.py\", line 6, in \u003cmodule\u003e\n run.assign_metric_to_grid(metric_name=\"test_metric_2d\", axes_ticks=numpy.arange(10), axes_labels=['x'])\n File \"/home/wk9874/Documents/simvue/python-api/simvue/utilities.py\", line 260, in wrapper\n return class_func(self, *args, **kwargs)\n File \"/home/wk9874/Documents/simvue/python-api/simvue/run.py\", line 105, in _wrapper\n return _function(self, *args, **kwargs)\n File \"/home/wk9874/Documents/simvue/python-api/simvue/utilities.py\", line 300, in wrapper\n raise RuntimeError(error_str)\nRuntimeError: `Grid.new` Validation:\n╒═════════╤═════════════╤══════════════════╤══════════════════════════════╕\n│ Input │ Location │ Type │ Message │\n╞═════════╪═════════════╪══════════════════╪══════════════════════════════╡\n│ 0 │ ['grid', 0] │ int != list_type │ Input should be a valid list │\n├─────────┼─────────────┼──────────────────┼──────────────────────────────┤\n│ 1 │ ['grid', 1] │ int != list_type │ Input should be a valid list │\n├─────────┼─────────────┼──────────────────┼──────────────────────────────┤\n│ 2 │ ['grid', 2] │ int != list_type │ Input should be a valid list │\n├─────────┼─────────────┼──────────────────┼──────────────────────────────┤\n│ 3 │ ['grid', 3] │ int != list_type │ Input should be a valid list │\n├─────────┼─────────────┼──────────────────┼──────────────────────────────┤\n│ 4 │ ['grid', 4] │ int != list_type │ Input should be a valid list │\n├─────────┼─────────────┼──────────────────┼──────────────────────────────┤\n│ 5 │ ['grid', 5] │ int != list_type │ Input should be a valid list │\n├─────────┼─────────────┼──────────────────┼──────────────────────────────┤\n│ 6 │ ['grid', 6] │ int != list_type │ Input should be a valid list │\n├─────────┼─────────────┼──────────────────┼──────────────────────────────┤\n│ 7 │ ['grid', 7] │ int != list_type │ Input should be a valid list │\n├─────────┼─────────────┼──────────────────┼──────────────────────────────┤\n│ 8 │ ['grid', 8] │ int != list_type │ Input should be a valid list │\n├─────────┼─────────────┼──────────────────┼──────────────────────────────┤\n│ 9 │ ['grid', 9] │ int != list_type │ Input should be a valid list │\n╘═════════╧═════════════╧══════════════════╧══════════════════════════════╛\n```\n## Screenshots\nIf applicable, add screenshots to help explain your problem.\n\n## Setup\n - OS: [e.g. Windows 11]\n - Python version [e.g. v3.13.3]\n\n## Additional context\nAdd any other context about the problem here.\n","author":{"url":"https://github.com/wk9874","@type":"Person","name":"wk9874"},"datePublished":"2025-10-16T11:04:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/883/python-api/issues/883"}
| 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:fc1223de-5bef-eaec-0758-81c0d3f88113 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D09A:D0153:75844:972A4:698E9D36 |
| html-safe-nonce | c58c7592aae929596fb9b4a3deeef1f05c72aa9d9e03b23ec7f924fa3ca0d9e9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDlBOkQwMTUzOjc1ODQ0Ojk3MkE0OjY5OEU5RDM2IiwidmlzaXRvcl9pZCI6IjQ4MjcxODc3OTUyNzY1MDQzNzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5bea0a04839124d0cc71941d312f068cdfeb49d80f28581ba5a2296bba29d40d |
| hovercard-subject-tag | issue:3521383215 |
| 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/simvue-io/python-api/883/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b923ac3db054df8306bb86cd0ef419dd1e0371b704a519eeffac55f0654b91b3/simvue-io/python-api/issues/883 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b923ac3db054df8306bb86cd0ef419dd1e0371b704a519eeffac55f0654b91b3/simvue-io/python-api/issues/883 |
| og:image:alt | Description of Bug If trying to create a grid for a 2D metric by providing a 1D array of ticks, it fails validation. Steps To Reproduce Code to reproduce the behavior: import simvue import numpy wi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wk9874 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba |
| turbo-cache-control | no-preview |
| go-import | github.com/simvue-io/python-api git https://github.com/simvue-io/python-api.git |
| octolytics-dimension-user_id | 113022477 |
| octolytics-dimension-user_login | simvue-io |
| octolytics-dimension-repository_id | 509501220 |
| octolytics-dimension-repository_nwo | simvue-io/python-api |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 509501220 |
| octolytics-dimension-repository_network_root_nwo | simvue-io/python-api |
| 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 | e6b91a7e6e46287d26887e3fb7a4161657bab8f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width