Title: Error when reading e.g. stresses or strains from binout of model with eroded elements with numpy version >= 2.0 · Issue #93 · open-lasso-python/lasso-python · GitHub
Open Graph Title: Error when reading e.g. stresses or strains from binout of model with eroded elements with numpy version >= 2.0 · Issue #93 · open-lasso-python/lasso-python
X Title: Error when reading e.g. stresses or strains from binout of model with eroded elements with numpy version >= 2.0 · Issue #93 · open-lasso-python/lasso-python
Description: 🐛 Describe the bug The code np.array(data) in method _get_variable in file binout.py leads to a ValueError if tuples in data have different lengths and numpy version >= 2.0, e.g. ValueError: setting an array element with a sequence. The ...
Open Graph Description: 🐛 Describe the bug The code np.array(data) in method _get_variable in file binout.py leads to a ValueError if tuples in data have different lengths and numpy version >= 2.0, e.g. ValueError: settin...
X Description: 🐛 Describe the bug The code np.array(data) in method _get_variable in file binout.py leads to a ValueError if tuples in data have different lengths and numpy version >= 2.0, e.g. ValueError: set...
Opengraph URL: https://github.com/open-lasso-python/lasso-python/issues/93
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error when reading e.g. stresses or strains from binout of model with eroded elements with numpy version \u003e= 2.0","articleBody":"**🐛 Describe the bug**\nThe code np.array(data) in method _get_variable in file binout.py leads to a ValueError if tuples in data have different lengths and numpy version \u003e= 2.0, e.g.\nValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (26,) + inhomogeneous part.\nThis problem was already raised in issue #62, but now the dependency is numpy\u003e2.2.\n\n**🔢 To Reproduce**\n Read e.g. stresses or strains from binout of model with eroded elements with numpy version \u003e= 2.0\n\n**🖥️ Setup**\n - lasso-python version: development\n - numpy version: 2.3.4\n\n**Possible Solutions**\nWould the numpy 1.x behavior be replicated if one used np.array(data, dtype=object) if the tuples have different lengths (either by explicitly checking or using a try except block)?\nAnother possibility would be to fill the missing values with e.g. np.nans but one would probably need to check the element IDs to fill in the correct columns.\nIn issue #62 there is a reply containing some code showing how the issue could be handled. If I understand it correctly, it just pads the missing values with zeros but does not take into account which elements were deleted.\n\n","author":{"url":"https://github.com/BerSchneider","@type":"Person","name":"BerSchneider"},"datePublished":"2025-11-17T15:39:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/93/lasso-python/issues/93"}
| 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:13efd47f-4e6e-1285-439e-5bf993944ec4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C1F8:EF97E:12D61FB:19F15F5:698DAE14 |
| html-safe-nonce | aa3942b66a6945f0e2c25e74e82c17d731866c94a7eecbf0d8c2223b286e6dc5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMUY4OkVGOTdFOjEyRDYxRkI6MTlGMTVGNTo2OThEQUUxNCIsInZpc2l0b3JfaWQiOiIxNjEyMDE1MjI5Mjc2NjMwNTQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 157066e6e43081c9331735bd88608f1f516b2dd2892cc333bff634127361c8c6 |
| hovercard-subject-tag | issue:3633863972 |
| 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/open-lasso-python/lasso-python/93/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fabf3108d78e0f8fd77795884c7fc12ce583dde4279f83374e7a7a76403d3954/open-lasso-python/lasso-python/issues/93 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fabf3108d78e0f8fd77795884c7fc12ce583dde4279f83374e7a7a76403d3954/open-lasso-python/lasso-python/issues/93 |
| og:image:alt | 🐛 Describe the bug The code np.array(data) in method _get_variable in file binout.py leads to a ValueError if tuples in data have different lengths and numpy version >= 2.0, e.g. ValueError: settin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | BerSchneider |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8c7947c0c592efeab6162b9909ad11fa43bff8b0cb5ff43273dc25e41979d43e |
| turbo-cache-control | no-preview |
| go-import | github.com/open-lasso-python/lasso-python git https://github.com/open-lasso-python/lasso-python.git |
| octolytics-dimension-user_id | 114169132 |
| octolytics-dimension-user_login | open-lasso-python |
| octolytics-dimension-repository_id | 540129748 |
| octolytics-dimension-repository_nwo | open-lasso-python/lasso-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 540129748 |
| octolytics-dimension-repository_network_root_nwo | open-lasso-python/lasso-python |
| 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 | b22a9fbf4dea601ec149a9e5362e0558df79b505 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width