Title: Array.apply does not detect dtype correctly · Issue #989 · larray-project/larray · GitHub
Open Graph Title: Array.apply does not detect dtype correctly · Issue #989 · larray-project/larray
X Title: Array.apply does not detect dtype correctly · Issue #989 · larray-project/larray
Description: I tried this as a workaround to #988: >>> arr = full("a=a0..a2", None) >>> arr.dtype dtype('O') >>> arr['a1'] = 'value' >>> arr == None False >>> arr.apply(lambda v: 0 if v is None else v) ValueError: invalid literal for int() with base ...
Open Graph Description: I tried this as a workaround to #988: >>> arr = full("a=a0..a2", None) >>> arr.dtype dtype('O') >>> arr['a1'] = 'value' >>> arr == None False >>> arr.apply(lambda v: 0 if v is None else v) ValueErr...
X Description: I tried this as a workaround to #988: >>> arr = full("a=a0..a2", None) >>> arr.dtype dtype('O') >>> arr['a1'] = 'value' >>> arr...
Opengraph URL: https://github.com/larray-project/larray/issues/989
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Array.apply does not detect dtype correctly","articleBody":"I tried this as a workaround to #988:\r\n\r\n```python\r\n>>> arr = full(\"a=a0..a2\", None)\r\n>>> arr.dtype\r\ndtype('O')\r\n>>> arr['a1'] = 'value'\r\n>>> arr == None\r\nFalse\r\n>>> arr.apply(lambda v: 0 if v is None else v)\r\nValueError: invalid literal for int() with base 10: 'value'\r\n>>> arr.apply(lambda v: 0 if v is None else v, dtype=object)\r\na a0 a1 a2\r\n 0 value 0\r\n```","author":{"url":"https://github.com/gdementen","@type":"Person","name":"gdementen"},"datePublished":"2021-11-09T14:17:04Z","url":"https://github.com/larray-project/larray/issues/989"}
| 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:b21a7aa6-74ac-f629-a00c-07fd0007c11f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EBD6:302FC:171ACB:1F21EA:6B001F69 |
| html-safe-nonce | 9651943f034f7bee000db1a722cd3edf49fce844c3aa37a3ced9a184b2c12183 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkQ2OjMwMkZDOjE3MUFDQjoxRjIxRUE6NkIwMDFGNjkiLCJ2aXNpdG9yX2lkIjoiODM5MDQwMzQzNTU2Mzg1MTYyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 556eb5a68fc3a47f37ff1626f45bd72dc1d713778bded34e37104be907362f14 |
| hovercard-subject-tag | issue:1048659936 |
| 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/989/issue_layout |
| twitter:image | https://opengraph.githubassets.com/198c0d39997a6681c52e0e360f34f54fe4ed98fefe9db34e21139ad4501e3e0c/larray-project/larray/issues/989 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/198c0d39997a6681c52e0e360f34f54fe4ed98fefe9db34e21139ad4501e3e0c/larray-project/larray/issues/989 |
| og:image:alt | I tried this as a workaround to #988: >>> arr = full("a=a0..a2", None) >>> arr.dtype dtype('O') >>> arr['a1'] = 'value' >>> arr == None False >>> arr.apply(lambda v: 0 if v is None else v) ValueErr... |
| 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