Title: import from iode · Issue #1032 · larray-project/larray · GitHub
Open Graph Title: import from iode · Issue #1032 · larray-project/larray
X Title: import from iode · Issue #1032 · larray-project/larray
Description: Should implement both read_av and read_var. See also #503 for export. For read_av, see demo_python...\demo_code\util\util.py:du_iode_to_larray Here is the latest version I used for read_var: def read_var(fpath, variables=None): if isinst...
Open Graph Description: Should implement both read_av and read_var. See also #503 for export. For read_av, see demo_python...\demo_code\util\util.py:du_iode_to_larray Here is the latest version I used for read_var: def re...
X Description: Should implement both read_av and read_var. See also #503 for export. For read_av, see demo_python...\demo_code\util\util.py:du_iode_to_larray Here is the latest version I used for read_var: def re...
Opengraph URL: https://github.com/larray-project/larray/issues/1032
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"import from iode","articleBody":"Should implement both read_av and read_var. See also #503 for export.\r\n\r\nFor `read_av`, see demo_python\\...\\demo_code\\util\\util.py:du_iode_to_larray\r\n\r\nHere is the latest version I used for `read_var`:\r\n```python\r\ndef read_var(fpath, variables=None):\r\n if isinstance(fpath, Path):\r\n fpath = str(fpath)\r\n if not os.path.exists(fpath):\r\n raise FileNotFoundError(fpath)\r\n if variables is None:\r\n arr = iode.wsloadvarpy(fpath)\r\n time_labels = arr.time.labels\r\n int_time_labels = time_labels.astype(int)\r\n if (time_labels == int_time_labels).all():\r\n arr = arr.set_labels('time', int_time_labels)\r\n return arr.rename('vars', 'variable')\r\n else:\r\n if not isinstance(variables, (tuple, list)):\r\n raise ValueError(\"variables argument should be either None or a tuple/list\")\r\n\r\n iode.wsloadvar(fpath)\r\n sample = iode.samplelist()\r\n int_sample = sample.astype(int)\r\n if (sample == int_sample).all():\r\n sample = int_sample\r\n time = Axis(sample, 'time')\r\n variable = Axis(variables, 'variable')\r\n return stack({k: Array(iode.getvector(k), time) for k in variables}, variable).T\r\n```\r\n\r\nPS: the iode module should really be improved, especially concerning its documentation.","author":{"url":"https://github.com/gdementen","@type":"Person","name":"gdementen"},"datePublished":"2022-10-25T13:42:46Z","url":"https://github.com/larray-project/larray/issues/1032"}
| 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:4beb0d20-d83a-8975-c613-ad94d1cd64c9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D3B0:2EC689:20DDECD:2C8CA09:6B001FA0 |
| html-safe-nonce | 35c0b7dab1141197365da284008759bb65f704c8982abc3eac925f6ed95aea53 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEM0IwOjJFQzY4OToyMERERUNEOjJDOENBMDk6NkIwMDFGQTAiLCJ2aXNpdG9yX2lkIjoiODI2OTY5MjIyNzYzNTE5OTA0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4655b5bae910809287771fd9298dba15a3b4dcec56b959e91042fa029c7170c0 |
| hovercard-subject-tag | issue:1422490985 |
| 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/1032/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0ccf31837ed3d41b5112482d1dcec03e006aeda5d3b24565a7b2441ddbae5238/larray-project/larray/issues/1032 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0ccf31837ed3d41b5112482d1dcec03e006aeda5d3b24565a7b2441ddbae5238/larray-project/larray/issues/1032 |
| og:image:alt | Should implement both read_av and read_var. See also #503 for export. For read_av, see demo_python...\demo_code\util\util.py:du_iode_to_larray Here is the latest version I used for read_var: def re... |
| 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