issue_comments
53 rows where issue = 299668148 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: reactions, created_at (date), updated_at (date)
issue 1
- Hooks for XArray operations · 53 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
510953379 | https://github.com/pydata/xarray/issues/1938#issuecomment-510953379 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDUxMDk1MzM3OQ== | shoyer 1217238 | 2019-07-12T16:40:53Z | 2019-07-12T16:40:53Z | MEMBER | We're at the point where this could be hacked together pretty quickly:
1. We need to remove the explicit casting to NumPy arrays (ala https://github.com/pydata/xarray/pull/2956). Checking for an |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
510948162 | https://github.com/pydata/xarray/issues/1938#issuecomment-510948162 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDUxMDk0ODE2Mg== | hameerabbasi 2190658 | 2019-07-12T16:23:41Z | 2019-07-12T16:23:41Z | MEMBER | @rabernat I can attend remotely. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
510947988 | https://github.com/pydata/xarray/issues/1938#issuecomment-510947988 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDUxMDk0Nzk4OA== | mrocklin 306380 | 2019-07-12T16:23:08Z | 2019-07-12T16:23:08Z | MEMBER | @jacobtomlinson got things sorta-working with NEP-18 and CuPy in an afternoon in Iris (with a strong emphasis on "kinda"). On the CuPy side you're fine. If you're on NumPy 1.16 you'll need to enable the
If you're using Numpy 1.17 then this is on by default. I think that most of the work here is on the Xarray side. We'll need to remove things like explicit type checks. |
{ "total_count": 2, "+1": 0, "-1": 0, "laugh": 0, "hooray": 2, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
510947769 | https://github.com/pydata/xarray/issues/1938#issuecomment-510947769 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDUxMDk0Nzc2OQ== | rabernat 1197350 | 2019-07-12T16:22:31Z | 2019-07-12T16:22:31Z | MEMBER | @hameerabbasi - are you at SciPy by any chance? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
510944897 | https://github.com/pydata/xarray/issues/1938#issuecomment-510944897 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDUxMDk0NDg5Nw== | hameerabbasi 2190658 | 2019-07-12T16:13:09Z | 2019-07-12T16:13:09Z | MEMBER |
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
510943324 | https://github.com/pydata/xarray/issues/1938#issuecomment-510943324 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDUxMDk0MzMyNA== | rabernat 1197350 | 2019-07-12T16:08:10Z | 2019-07-12T16:08:10Z | MEMBER | I am sitting in the SciPy talk about CuPy. Would be great if someone could give us an update on how this issue stands before tomorrow's xarray sprint. Someone my want to try plugging CuPy arrays into xarray. But this issue doesn't really resolve the best way to do that. As far as I can tell @hameerabbasi's "arrayish" project was deprecated in favor of uarray / unumpy. What is the best path forward as of today, July 12, 2019? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
383112044 | https://github.com/pydata/xarray/issues/1938#issuecomment-383112044 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM4MzExMjA0NA== | hameerabbasi 2190658 | 2018-04-20T14:22:03Z | 2018-04-20T14:22:03Z | MEMBER | Let's move this discussion over to hameerabbasi/arrayish#1. But, in summary, I got the impression that the community in general is unhappy with the name "duck arrays". |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
383109977 | https://github.com/pydata/xarray/issues/1938#issuecomment-383109977 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM4MzEwOTk3Nw== | mrocklin 306380 | 2018-04-20T14:15:38Z | 2018-04-20T14:15:38Z | MEMBER | Thanks for taking the initiative here @hameerabbasi ! It's good to see something up already. Here is a link to the discussion that I think @hameerabbasi is referring to: http://numpy-discussion.10968.n7.nabble.com/new-NEP-np-AbstractArray-and-np-asabstractarray-tt45282.html#none I haven't read through that entirely yet, was arrayish decided on by the community or was the term still up for discussion? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
383105722 | https://github.com/pydata/xarray/issues/1938#issuecomment-383105722 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM4MzEwNTcyMg== | hameerabbasi 2190658 | 2018-04-20T14:01:55Z | 2018-04-20T14:01:55Z | MEMBER | I've written it up and already released version 0.0.1 on PyPI, except Also, |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
383104966 | https://github.com/pydata/xarray/issues/1938#issuecomment-383104966 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM4MzEwNDk2Ng== | mrocklin 306380 | 2018-04-20T13:59:23Z | 2018-04-20T13:59:23Z | MEMBER | Happy with arrayish too On Fri, Apr 20, 2018 at 9:59 AM, Matthew Rocklin mrocklin@gmail.com wrote:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
383104907 | https://github.com/pydata/xarray/issues/1938#issuecomment-383104907 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM4MzEwNDkwNw== | mrocklin 306380 | 2018-04-20T13:59:09Z | 2018-04-20T13:59:09Z | MEMBER | What name should we go with? I have a slight preference for duckarray over arrayish but happy with whatever the group decides. On Fri, Apr 20, 2018 at 1:51 AM, Hameer Abbasi notifications@github.com wrote:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
382985783 | https://github.com/pydata/xarray/issues/1938#issuecomment-382985783 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM4Mjk4NTc4Mw== | hameerabbasi 2190658 | 2018-04-20T05:51:02Z | 2018-04-20T06:02:30Z | MEMBER | I've created one, as per your e-mail: https://github.com/hameerabbasi/arrayish The name is inspired from a recent discussion about this on the Numpy mailing list. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
382918970 | https://github.com/pydata/xarray/issues/1938#issuecomment-382918970 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM4MjkxODk3MA== | shoyer 1217238 | 2018-04-20T00:04:43Z | 2018-04-20T01:43:28Z | MEMBER | I like Should we go ahead and start |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
382901777 | https://github.com/pydata/xarray/issues/1938#issuecomment-382901777 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM4MjkwMTc3Nw== | mrocklin 306380 | 2018-04-19T22:36:48Z | 2018-04-19T22:36:48Z | MEMBER | Doing this externally sounds sensible to me. Thoughts on a good name? duck_array seems to be free on PyPI On Thu, Apr 19, 2018 at 4:23 PM, Stephan Hoyer notifications@github.com wrote:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
382868997 | https://github.com/pydata/xarray/issues/1938#issuecomment-382868997 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM4Mjg2ODk5Nw== | shoyer 1217238 | 2018-04-19T20:23:39Z | 2018-04-19T20:23:39Z | MEMBER | This library would have hard dependencies only on numpy and multipledispatch, and would expose a multipledispatch namespace so extending it doesn't have to happen in the library itself. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
382867200 | https://github.com/pydata/xarray/issues/1938#issuecomment-382867200 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM4Mjg2NzIwMA== | shoyer 1217238 | 2018-04-19T20:17:19Z | 2018-04-19T20:17:19Z | MEMBER | By "muktipledy" I mean "multipledispatch"(on my phone) |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
382867083 | https://github.com/pydata/xarray/issues/1938#issuecomment-382867083 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM4Mjg2NzA4Mw== | shoyer 1217238 | 2018-04-19T20:16:49Z | 2018-04-19T20:16:49Z | MEMBER | Basically, the library would define functions like |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
382862822 | https://github.com/pydata/xarray/issues/1938#issuecomment-382862822 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM4Mjg2MjgyMg== | hameerabbasi 2190658 | 2018-04-19T20:01:41Z | 2018-04-19T20:01:41Z | MEMBER | By minimal library, I'm assuming you mean something of the sort discussed about abstract arrays? What functionality would such a library have? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
382859987 | https://github.com/pydata/xarray/issues/1938#issuecomment-382859987 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM4Mjg1OTk4Nw== | shoyer 1217238 | 2018-04-19T19:51:56Z | 2018-04-19T19:51:56Z | MEMBER | I'm thinking it could make sense to build this minimal library for "duck typed arrays" with multipledispatch outside of xarray. That would make it easier for library builders to use and extend it. Anyone interested in getting started o nthat? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
382709490 | https://github.com/pydata/xarray/issues/1938#issuecomment-382709490 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM4MjcwOTQ5MA== | mrocklin 306380 | 2018-04-19T12:05:22Z | 2018-04-19T12:05:22Z | MEMBER | In https://github.com/pydata/sparse/issues/1#issuecomment-370248174 @shoyer mentions that some work could likely progress in XArray before deciding on the VarArgs in multipledispatch. If XArray maintainers have time it might be valuable to lay out how that would look so that other devs can try it out. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368605364 | https://github.com/pydata/xarray/issues/1938#issuecomment-368605364 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODYwNTM2NA== | shoyer 1217238 | 2018-02-26T18:45:13Z | 2018-02-26T18:45:13Z | MEMBER | { "total_count": 1, "+1": 0, "-1": 0, "laugh": 1, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | ||
368602406 | https://github.com/pydata/xarray/issues/1938#issuecomment-368602406 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODYwMjQwNg== | hameerabbasi 2190658 | 2018-02-26T18:35:21Z | 2018-02-26T18:35:21Z | MEMBER | Maybe submit a PR? We could all use this. Does it support variable-length arguments? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368598394 | https://github.com/pydata/xarray/issues/1938#issuecomment-368598394 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODU5ODM5NA== | shoyer 1217238 | 2018-02-26T18:22:33Z | 2018-02-26T18:22:33Z | MEMBER | I made a tweaked version of dispatching to list subtypes, which probably suitable for use in xarray: https://drive.google.com/file/d/18zdyUpWLNFzFaz08GUOC5vs1GxE_jHg-/view?usp=sharing Example behavior: ```python @dispatch(List[int]) def f(args): print('integers:', args) @dispatch(List[str]) def f(args): print('strings:', args) @dispatch(List[str, int]) def f(args): print('mixed str-int:', args) f([1, 2]) # integers: [1, 2] f([1, 2, 'foo']) # mixed str-int: [1, 2, 'foo'] f(['foo', 'bar']) # strings: ['foo', 'bar'] f([[1, 2]]) # NotImplementedError: Could not find signature for f: <List[list]> ``` Differences from @llllllllll's It would be straightforward to adapt this to use |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368399227 | https://github.com/pydata/xarray/issues/1938#issuecomment-368399227 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODM5OTIyNw== | hameerabbasi 2190658 | 2018-02-26T06:02:22Z | 2018-02-26T06:02:22Z | MEMBER |
You're assuming here most users of XArray would be using a recent version of Numpy... Which is a totally fine assumption IMO. We make the same one for sparse. However, consider that some people may be using something like conda, which (because of complex dependencies and all) may end up delaying updates (both for Numpy and XArray). I guess however; if people really wanted the updates they could use pip.
I would say a little clean-up with some extra decorators for exactly this purpose may be in order, that way, individual wrapping functions aren't needed. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368281147 | https://github.com/pydata/xarray/issues/1938#issuecomment-368281147 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODI4MTE0Nw== | shoyer 1217238 | 2018-02-25T03:56:38Z | 2018-02-25T03:56:38Z | MEMBER | Indeed, typing support for multipledispatch looks it's a ways off. To be honest, the VarArgs solution looks a little ugly to me, so I'm not sure it's with enshrining in multipledispatch either. I guess that leaves putting our own ad-hoc solution on top of multipledispatch in xarray for now. Which really is totally fine -- this is all a stop gap measure until NumPy itself supports this sort of duck typing. On Sat, Feb 24, 2018 at 7:46 PM Joe Jevnik notifications@github.com wrote:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368280791 | https://github.com/pydata/xarray/issues/1938#issuecomment-368280791 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODI4MDc5MQ== | llllllllll 3064397 | 2018-02-25T03:47:41Z | 2018-02-25T03:47:41Z | NONE | @hameerabbasi This really doesn't work with |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368280749 | https://github.com/pydata/xarray/issues/1938#issuecomment-368280749 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODI4MDc0OQ== | llllllllll 3064397 | 2018-02-25T03:46:19Z | 2018-02-25T03:46:19Z | NONE | Given the issues raised on that PR as well as the profiling results shown here I think that PR will need some serious work before it could be merged. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368279019 | https://github.com/pydata/xarray/issues/1938#issuecomment-368279019 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODI3OTAxOQ== | shoyer 1217238 | 2018-02-25T03:02:59Z | 2018-02-25T03:02:59Z | MEMBER | I spent some time thinking about this today. The cleanest answer is probably support for standard typing annotations in multipledispatch, at least for |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368269360 | https://github.com/pydata/xarray/issues/1938#issuecomment-368269360 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODI2OTM2MA== | hameerabbasi 2190658 | 2018-02-24T23:41:44Z | 2018-02-24T23:43:49Z | MEMBER | Something like Actually it'd be nice to have something like |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368269205 | https://github.com/pydata/xarray/issues/1938#issuecomment-368269205 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODI2OTIwNQ== | hameerabbasi 2190658 | 2018-02-24T23:38:33Z | 2018-02-24T23:38:33Z | MEMBER | @llllllllll How hard would it be to make this work for star-args? I realize you could just add an extra wrapper but it'd be nice if you didn't have to. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368268549 | https://github.com/pydata/xarray/issues/1938#issuecomment-368268549 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODI2ODU0OQ== | shoyer 1217238 | 2018-02-24T23:25:49Z | 2018-02-24T23:25:49Z | MEMBER |
Yes, |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368268456 | https://github.com/pydata/xarray/issues/1938#issuecomment-368268456 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODI2ODQ1Ng== | hameerabbasi 2190658 | 2018-02-24T23:24:15Z | 2018-02-24T23:24:15Z | MEMBER | Is there a way to handle kwargs (not with types, but ignoring them)? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368268266 | https://github.com/pydata/xarray/issues/1938#issuecomment-368268266 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODI2ODI2Ng== | hameerabbasi 2190658 | 2018-02-24T23:21:01Z | 2018-02-24T23:21:01Z | MEMBER | This might even help us out in Sparse for dispatch with |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368267730 | https://github.com/pydata/xarray/issues/1938#issuecomment-368267730 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODI2NzczMA== | mrocklin 306380 | 2018-02-24T23:11:28Z | 2018-02-24T23:11:28Z | MEMBER | cc @jcrist , who has historically been interested in how we solve this problem within dask.array |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368207468 | https://github.com/pydata/xarray/issues/1938#issuecomment-368207468 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODIwNzQ2OA== | hameerabbasi 2190658 | 2018-02-24T07:24:02Z | 2018-02-24T07:24:02Z | MEMBER | Another benefit to this would be that if XArray didn't want to support a particular library in its own code, the library itself could add the hooks. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368190478 | https://github.com/pydata/xarray/issues/1938#issuecomment-368190478 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODE5MDQ3OA== | shoyer 1217238 | 2018-02-24T02:25:25Z | 2018-02-24T02:25:25Z | MEMBER | @mrocklin this is roughy what we would want in multipledispatch: https://github.com/blaze/blaze/blob/master/blaze/compute/varargs.py#L20-L90 This involves metaclasses, which frankly do blow my mind a little bit. Probably the magic could be tuned down a little bit, but metaclasses are necessary at least for implementing |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368159542 | https://github.com/pydata/xarray/issues/1938#issuecomment-368159542 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODE1OTU0Mg== | mrocklin 306380 | 2018-02-23T22:41:54Z | 2018-02-23T22:41:54Z | MEMBER | I would want to see how magical it was. @llllllllll 's calibration of "mild metaprogramming" may differ slightly from my own :) Eventually if multipledispatch becomes a dependency of xarray then we should consider changing the decision-making process away from being just me though. Relatedly, SymPy also just adopted it (by vendoring) as a dependency. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368111050 | https://github.com/pydata/xarray/issues/1938#issuecomment-368111050 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODExMTA1MA== | llllllllll 3064397 | 2018-02-23T19:16:37Z | 2018-02-23T19:16:37Z | NONE | I wouldn't mind submitting this upstream, but I will defer to @mrocklin. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368110090 | https://github.com/pydata/xarray/issues/1938#issuecomment-368110090 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODExMDA5MA== | shoyer 1217238 | 2018-02-23T19:13:14Z | 2018-02-23T19:13:14Z | MEMBER |
Usually, this is not a good idea. The problem is that it's impossible to know a global priority order across unrelated packages. It's usually better to declare valid type matches explicitly. NumPy tried this with |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368108543 | https://github.com/pydata/xarray/issues/1938#issuecomment-368108543 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODEwODU0Mw== | shoyer 1217238 | 2018-02-23T19:07:46Z | 2018-02-23T19:07:46Z | MEMBER | As for my last concern, "Dispatch for the first argument(s) only" it looks like the simple answer is that multipledispatch already only dispatches based on positional arguments. So as long as we're strict about using keyword arguments for extra parameters like It looks like this resolves almost all of my concerns about using multiple dispatch. One thing that would be nice is it |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368107036 | https://github.com/pydata/xarray/issues/1938#issuecomment-368107036 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODEwNzAzNg== | shoyer 1217238 | 2018-02-23T19:02:34Z | 2018-02-23T19:02:34Z | MEMBER | Yes, I just tested out the wrapping dispatch. It works and is quite clean. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368106885 | https://github.com/pydata/xarray/issues/1938#issuecomment-368106885 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODEwNjg4NQ== | hameerabbasi 2190658 | 2018-02-23T19:02:02Z | 2018-02-23T19:02:02Z | MEMBER | How about something like checking inside a list if something is top priority, then call |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368106529 | https://github.com/pydata/xarray/issues/1938#issuecomment-368106529 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODEwNjUyOQ== | llllllllll 3064397 | 2018-02-23T19:00:39Z | 2018-02-23T19:00:39Z | NONE | The wrapping dispatch would just look like:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368105739 | https://github.com/pydata/xarray/issues/1938#issuecomment-368105739 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODEwNTczOQ== | llllllllll 3064397 | 2018-02-23T18:57:59Z | 2018-02-23T18:58:47Z | NONE | We could make a particular list an instance of a particular |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368103344 | https://github.com/pydata/xarray/issues/1938#issuecomment-368103344 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODEwMzM0NA== | hameerabbasi 2190658 | 2018-02-23T18:49:41Z | 2018-02-23T18:49:41Z | MEMBER | Can't some wild metaprogramming make it so that |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368100305 | https://github.com/pydata/xarray/issues/1938#issuecomment-368100305 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODEwMDMwNQ== | llllllllll 3064397 | 2018-02-23T18:39:50Z | 2018-02-23T18:40:46Z | NONE |
```python In [1]: from blaze.compute.varargs import VarArgs In [2]: from multipledispatch import dispatch In [3]: @dispatch(VarArgs[float]) ...: def f(args): ...: print('floats') ...: In [4]: @dispatch(VarArgs[str]) ...: def f(args): ...: print('strings') ...: In [5]: @dispatch(VarArgs[str, float]) ...: def f(args): ...: print('mixed') ...: In [6]: f(VarArgs(['foo'])) strings In [7]: f(VarArgs([1.0])) floats In [8]: f(VarArgs([1.0, 'foo'])) mixed In [9]: VarArgs([1.0, 'foo']) Out[9]: VarArgsfloat, str ``` You could hide this behind a top-level function that wraps the input for the user, or register a dispatch for list which boxes and recurses into itself. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368097912 | https://github.com/pydata/xarray/issues/1938#issuecomment-368097912 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODA5NzkxMg== | shoyer 1217238 | 2018-02-23T18:32:04Z | 2018-02-23T18:32:04Z | MEMBER | @llllllllll very cool! Is there a special trick I need to use this? I tried: ```python first: pip install https://github.com/blaze/blaze/archive/master.tar.gzimport blaze.compute from blaze.compute.varargs import VarArgs from multipledispatch import dispatch @dispatch(VarArgs[float]) def f(args): print('floats') @dispatch(VarArgs[str]) def f(args): print('strings') @dispatch(VarArgs[str, float])
def f(args):
print('mixed')
KeyError Traceback (most recent call last) /usr/local/lib/python3.6/dist-packages/multipledispatch/dispatcher.py in call(self, args, *kwargs) 154 try: --> 155 func = self._cache[types] 156 except KeyError: KeyError: (<class 'list'>,) During handling of the above exception, another exception occurred: NotImplementedError Traceback (most recent call last) <ipython-input-5-19f52a9a1dd6> in <module>() ----> 1 f(['foo']) /usr/local/lib/python3.6/dist-packages/multipledispatch/dispatcher.py in call(self, args, *kwargs) 159 raise NotImplementedError( 160 'Could not find signature for %s: <%s>' % --> 161 (self.name, str_signature(types))) 162 self._cache[types] = func 163 try: NotImplementedError: Could not find signature for f: <list> ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368084600 | https://github.com/pydata/xarray/issues/1938#issuecomment-368084600 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODA4NDYwMA== | shoyer 1217238 | 2018-02-23T17:44:27Z | 2018-02-23T18:17:28Z | MEMBER | Dispatch for stack/concatenate is definitely on the radar for NumPy development, but I don't know when it's actually going to happen. The likely interface is something like We only need this for a couple of operations, so in any case we can probably implement our own ad-hoc dispatch system for On further contemplation, overloading based on union types with a system like multipledispatch does seem tricky. It's not clear to me that there's even a well defined type for inputs to concatenate that should be dispatched to dask vs. numpy, for example. We want to let that dask handle any cases where at least one input is a dask array, but a type like |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368091406 | https://github.com/pydata/xarray/issues/1938#issuecomment-368091406 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODA5MTQwNg== | llllllllll 3064397 | 2018-02-23T18:08:30Z | 2018-02-23T18:08:30Z | NONE | In blaze we have variadic sequences for multiple dispatch, and the Here is an example of what that looks like for |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368068500 | https://github.com/pydata/xarray/issues/1938#issuecomment-368068500 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODA2ODUwMA== | mrocklin 306380 | 2018-02-23T16:54:37Z | 2018-02-23T16:54:37Z | MEMBER | Import times on multipledispatch have improved thanks to work by @llllllllll . They could probably be further improved if people wanted to invest modest intellectual effort here. Costs scale with the number of type signatures on each operation. In blaze this was very high, well into the hundreds, in our case it would be, I think, more modest around 2-10. (also, historical note, multipledispatch predates my involvement in Blaze). When possible it would be useful to upstream these concerns to NumPy, even if we have to move faster than NumPy is able to support. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368066239 | https://github.com/pydata/xarray/issues/1938#issuecomment-368066239 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODA2NjIzOQ== | shoyer 1217238 | 2018-02-23T16:47:53Z | 2018-02-23T16:47:53Z | MEMBER |
For two array backends, it didn't make sense to write an abstraction layer for this, in part because it wasn't clear what we needed. But for three examples, it probably does -- that's the point where shared use cases become clear. Undoubtedly, there will be other cases in the future where users will want to extend xarray to handle new array types (arrays with units come to mind). For implementing these overloads/functions, there are various possible solutions. Our current ad-hoc system is similar to what @hameerabbasi suggests -- we check the type of the first argument and use that to dispatch to an appropriate function. This has the advantage of being easy to implement for a known set of types, but a single dispatch order is not very extensible -- it's impossible to anticipate every third-party class. Recently, NumPy has moved away from this (e.g., with One appealing option is to make use of @mrocklin's multipledispatch library, which was originally developed for Blaze and is still in active use. Possible concerns:
1. Performance. Import times need to be fast, and I know this is something that |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368016521 | https://github.com/pydata/xarray/issues/1938#issuecomment-368016521 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODAxNjUyMQ== | hameerabbasi 2190658 | 2018-02-23T14:00:50Z | 2018-02-23T14:04:18Z | MEMBER | Then I would suggest something like the following for hooks (omitting imports): ```python Registered in order of priorityxarray.interfaces.register('DaskArray', lambda ar: isinstance(ar, da.array)) xarray.hooks.register('nansum', 'DaskArray', da.nansum) xarray.interfaces.register('SparseArray', lambda ar: isinstance(ar, sparse.SparseArray)) xarray.hooks.register('nansum', 'SparseArray', sparse.nansum) ``` And then, in code, call the appropriate
If you need help, I'd be willing to give it. :-) But I'm not a user of XArray, so I don't really understand the use-cases or codebase. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 | |
368004970 | https://github.com/pydata/xarray/issues/1938#issuecomment-368004970 | https://api.github.com/repos/pydata/xarray/issues/1938 | MDEyOklzc3VlQ29tbWVudDM2ODAwNDk3MA== | fujiisoup 6815844 | 2018-02-23T13:10:30Z | 2018-02-23T13:10:30Z | MEMBER | Thanks for leading the development of sparse. I'm looking forward to see it in xarray:) Currently, our logic to support Do we need to be capable of supporting other objects for future extension? If so, we may need to start from (heavy) refactoring. @shoyer, Could you give any suggestion? I am personally interested in helping this, but I may need to decide the direction first. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Hooks for XArray operations 299668148 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [performed_via_github_app] TEXT, [issue] INTEGER REFERENCES [issues]([id]) ); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user 6