Title: alternative methods of collecting an axis_iter to ndarray matrix · Issue #249 · rust-ndarray/ndarray · GitHub
Open Graph Title: alternative methods of collecting an axis_iter to ndarray matrix · Issue #249 · rust-ndarray/ndarray
X Title: alternative methods of collecting an axis_iter to ndarray matrix · Issue #249 · rust-ndarray/ndarray
Description: I'm working on a dataframe implementation that provides two-dimensional iterator adaptors over ndarray matrices. pub struct DataFrame { pub columns: Vec
Open Graph Description: I'm working on a dataframe implementation that provides two-dimensional iterator adaptors over ndarray matrices. pub struct DataFrame { pub columns: Vec
X Description: I'm working on a dataframe implementation that provides two-dimensional iterator adaptors over ndarray matrices. pub struct DataFrame { pub columns: Vec<OuterType>, pub data: Matrix<In...
Opengraph URL: https://github.com/rust-ndarray/ndarray/issues/249
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"alternative methods of collecting an axis_iter to ndarray matrix","articleBody":"I'm working on a dataframe implementation that provides two-dimensional iterator adaptors over ndarray matrices. \r\n\r\n```\r\npub struct DataFrame {\r\n pub columns: Vec\u003cOuterType\u003e,\r\n pub data: Matrix\u003cInnerType\u003e,\r\n pub index: Vec\u003cOuterType\u003e,\r\n}\r\n```\r\n\r\nThe dataframe's data are an enum over something called `InnerType`, which allows the dataframe to support a variety of types, like dataframes in other languages:\r\n\r\n```\r\npub enum InnerType {\r\n Float(f64),\r\n Int64(i64),\r\n Int32(i32),\r\n Str(String),\r\n Empty,\r\n}\r\n```\r\n\r\nThe iterator adaptors `impl Iterator\u003cItem = (OuterType, ArrayView\u003c'a, InnerType, usize\u003e)\u003e`.\r\n\r\nNotice the `InnerType::Str(String)`. Because of this value, `InnerType` is not Copy, and I'm unable to collect the adaptors' items into a DataFrame via `stack`. Can you help me think of another way to collect the iterator adaptor into an ndarray matrix, without needing Copy, so I can support Strings in the dataframe? This problem may also affect implementing something like `FromCSV`, which would go from a CSV reader iterator to a DataFrame.\r\n\r\nIf you want to check out the project further, you can do so here: https://github.com/pegasos1/rust-dataframe","author":{"url":"https://github.com/kernelmachine","@type":"Person","name":"kernelmachine"},"datePublished":"2016-12-14T16:52:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":16},"url":"https://github.com/249/ndarray/issues/249"}
| 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:c1ce87dd-b7b6-debe-425d-2cb6d48757e2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A616:3BFB17:770E2A8:9A2F039:6975AFBC |
| html-safe-nonce | b059dd80fd09a8d53dae5d81f52e78cef72720f440acaf7b63f64be9442d5ed6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjE2OjNCRkIxNzo3NzBFMkE4OjlBMkYwMzk6Njk3NUFGQkMiLCJ2aXNpdG9yX2lkIjoiNzgzMTI0MDUwNTEwNTQyODQxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 93ac97e75bafbaa328d08bc2a73408969a5b598e960e08490a4d598826a06fb8 |
| hovercard-subject-tag | issue:195585256 |
| 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/rust-ndarray/ndarray/249/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8cdc99caf10211f85a0907dd641ad4b0670ba6643d50709ed5667a712515cbc4/rust-ndarray/ndarray/issues/249 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8cdc99caf10211f85a0907dd641ad4b0670ba6643d50709ed5667a712515cbc4/rust-ndarray/ndarray/issues/249 |
| og:image:alt | I'm working on a dataframe implementation that provides two-dimensional iterator adaptors over ndarray matrices. pub struct DataFrame { pub columns: Vec |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kernelmachine |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/rust-ndarray/ndarray git https://github.com/rust-ndarray/ndarray.git |
| octolytics-dimension-user_id | 44419403 |
| octolytics-dimension-user_login | rust-ndarray |
| octolytics-dimension-repository_id | 22598813 |
| octolytics-dimension-repository_nwo | rust-ndarray/ndarray |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 22598813 |
| octolytics-dimension-repository_network_root_nwo | rust-ndarray/ndarray |
| 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 | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width