Title: Inconsistent behavior for whitespace in labels · Issue #885 · larray-project/larray · GitHub
Open Graph Title: Inconsistent behavior for whitespace in labels · Issue #885 · larray-project/larray
X Title: Inconsistent behavior for whitespace in labels · Issue #885 · larray-project/larray
Description: We strip (whitespace from) labels in some cases but not in others In a axis creation string, they are stripped (seems fine to me) >>> arr = ndtest('a=a0,a1 ,a2') >>> arr.axes AxisCollection([ Axis(['a0', 'a1', 'a2'], 'a') ]) In explicit ...
Open Graph Description: We strip (whitespace from) labels in some cases but not in others In a axis creation string, they are stripped (seems fine to me) >>> arr = ndtest('a=a0,a1 ,a2') >>> arr.axes AxisCollection([ Axis(...
X Description: We strip (whitespace from) labels in some cases but not in others In a axis creation string, they are stripped (seems fine to me) >>> arr = ndtest('a=a0,a1 ,a2') >>> arr.a...
Opengraph URL: https://github.com/larray-project/larray/issues/885
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Inconsistent behavior for whitespace in labels","articleBody":"We strip (whitespace from) labels in some cases but not in others\r\n\r\nIn a axis creation string, they are stripped (seems fine to me)\r\n\r\n```python\r\n>>> arr = ndtest('a=a0,a1 ,a2')\r\n>>> arr.axes\r\nAxisCollection([\r\n Axis(['a0', 'a1', 'a2'], 'a')\r\n])\r\n```\r\n\r\nIn explicit axis creation, they are not stripped (still fine to me)\r\n\r\n```python\r\n>>> arr = ndtest(Axis(['a0', 'a1 '], 'a'))\r\n>>> arr.axes\r\nAxisCollection([\r\n Axis(['a0', 'a1 '], 'a')\r\n])\r\n```\r\n\r\nWhen targeting an explicit key on an explicit axis, they are stripped. This is probably a bad idea.\r\n\r\n```python\r\n>>> arr[arr.a['a1 ']]\r\nValueError: a['a1'] is not a valid label for any axis\r\n>>> arr.a['a1 ']\r\na['a1']\r\n>>> arr[arr.a.i[1]]\r\n1\r\n>>> arr.a[['a1 ', 'a2']]\r\na['a1 ', 'a2']\r\n```\r\n\r\nWe should either strip them during axis creation (with a warning) OR not strip them when targeting a **single** label on an axis.\r\n\r\nWe could implement the following:\r\n```python\r\n>>> arr.a['a1 ']\r\na['a1 ']\r\n>>> arr.a['a1 ,a2']\r\na['a1', 'a2']\r\n>>> arr.a[['a1 ', 'a2']]\r\na['a1 ', 'a2']\r\n```","author":{"url":"https://github.com/gdementen","@type":"Person","name":"gdementen"},"datePublished":"2020-08-06T11:36:05Z","url":"https://github.com/larray-project/larray/issues/885"}
| 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:b859b11f-a29c-7392-c902-7ab2a33cad6d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 88B6:B1603:2D9E457:3C3850F:6B001F6A |
| html-safe-nonce | f8d3c1faa112bb7adb801a5bb3aacde248ed3bdd274f3b8be00176e5663ac7b3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OEI2OkIxNjAzOjJEOUU0NTc6M0MzODUwRjo2QjAwMUY2QSIsInZpc2l0b3JfaWQiOiI5MDEyMjczODAzMzQ2MDU5MTE0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5d814cefc0da43e87e242604e4e678f927df83ae957ab9cb2e94e34dc4375f44 |
| hovercard-subject-tag | issue:674245394 |
| 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/larray-project/larray/885/issue_layout |
| twitter:image | https://opengraph.githubassets.com/530b8205a1df983cc777e553ca097fdf89a892867887aa859b91a6eb986bd61e/larray-project/larray/issues/885 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/530b8205a1df983cc777e553ca097fdf89a892867887aa859b91a6eb986bd61e/larray-project/larray/issues/885 |
| og:image:alt | We strip (whitespace from) labels in some cases but not in others In a axis creation string, they are stripped (seems fine to me) >>> arr = ndtest('a=a0,a1 ,a2') >>> arr.axes AxisCollection([ Axis(... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gdementen |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| turbo-cache-control | no-preview |
| go-import | github.com/larray-project/larray git https://github.com/larray-project/larray.git |
| octolytics-dimension-user_id | 26460981 |
| octolytics-dimension-user_login | larray-project |
| octolytics-dimension-repository_id | 16981067 |
| octolytics-dimension-repository_nwo | larray-project/larray |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16981067 |
| octolytics-dimension-repository_network_root_nwo | larray-project/larray |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width