issue_comments
35 rows where issue = 179052741 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: reactions, created_at (date), updated_at (date)
issue 1
- WIP: Optional indexes (no more default coordinates given by range(n)) · 35 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
272670336 | https://github.com/pydata/xarray/pull/1017#issuecomment-272670336 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI3MjY3MDMzNg== | shoyer 1217238 | 2017-01-15T03:09:05Z | 2017-01-15T03:09:05Z | MEMBER | @fmaussion has raised some concerns about the new repr in #1199 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
267222684 | https://github.com/pydata/xarray/pull/1017#issuecomment-267222684 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2NzIyMjY4NA== | shoyer 1217238 | 2016-12-15T02:40:42Z | 2016-12-15T02:40:42Z | MEMBER | OK, in it goes! |
{ "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
267220567 | https://github.com/pydata/xarray/pull/1017#issuecomment-267220567 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2NzIyMDU2Nw== | crusaderky 6213168 | 2016-12-15T02:30:24Z | 2016-12-15T02:30:24Z | MEMBER | Go on :) On 15 Dec 2016 02:08, "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 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
267216439 | https://github.com/pydata/xarray/pull/1017#issuecomment-267216439 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2NzIxNjQzOQ== | shoyer 1217238 | 2016-12-15T02:08:42Z | 2016-12-15T02:08:57Z | MEMBER |
Done. Any further concerns? I'd really like to merge this and then get the 0.9 release out shortly after. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
266015193 | https://github.com/pydata/xarray/pull/1017#issuecomment-266015193 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2NjAxNTE5Mw== | shoyer 1217238 | 2016-12-09T13:36:12Z | 2016-12-09T13:36:12Z | MEMBER |
This seems like the best alternative to me. I don't like omitting the variable name because it seems that it might fall under the previous row, like a level in the MultiIndex repr. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
265987531 | https://github.com/pydata/xarray/pull/1017#issuecomment-265987531 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2NTk4NzUzMQ== | benbovy 4160723 | 2016-12-09T10:57:06Z | 2016-12-09T10:57:06Z | MEMBER | The only concern I have for the repr changes is using the symbol
or use another symbol like
and/or even remove the coordinate name (because there is no coordinate)
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
265702329 | https://github.com/pydata/xarray/pull/1017#issuecomment-265702329 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2NTcwMjMyOQ== | shoyer 1217238 | 2016-12-08T10:07:02Z | 2016-12-08T10:07:02Z | MEMBER |
Done -- missing coordinates are marked by Are there any other concerns before I merge this? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
264825732 | https://github.com/pydata/xarray/pull/1017#issuecomment-264825732 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2NDgyNTczMg== | shoyer 1217238 | 2016-12-05T11:02:34Z | 2016-12-05T11:02:34Z | MEMBER |
See #1153 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
261754050 | https://github.com/pydata/xarray/pull/1017#issuecomment-261754050 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2MTc1NDA1MA== | shoyer 1217238 | 2016-11-20T02:29:20Z | 2016-11-20T02:29:20Z | MEMBER | Another option: finally add a boolean |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
261695720 | https://github.com/pydata/xarray/pull/1017#issuecomment-261695720 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2MTY5NTcyMA== | max-sixty 5635139 | 2016-11-19T05:55:18Z | 2016-11-19T05:55:18Z | MEMBER |
In python sets have a Overall no strong view; I'm probably a weak vote against adding |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
261689325 | https://github.com/pydata/xarray/pull/1017#issuecomment-261689325 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2MTY4OTMyNQ== | shoyer 1217238 | 2016-11-19T03:07:40Z | 2016-11-19T03:07:40Z | MEMBER |
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
261688345 | https://github.com/pydata/xarray/pull/1017#issuecomment-261688345 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2MTY4ODM0NQ== | shoyer 1217238 | 2016-11-19T02:50:12Z | 2016-11-19T02:51:09Z | MEMBER | I tried adding
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
260817028 | https://github.com/pydata/xarray/pull/1017#issuecomment-260817028 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2MDgxNzAyOA== | crusaderky 6213168 | 2016-11-16T00:38:43Z | 2016-11-16T00:38:43Z | MEMBER | @shoyer: maybe you could print the dummy coord (as in my example) if there's one or more real coord, and don't print the coords block at all if there isn't any (as in your example)? The problem of readability only happens when there's some coords - so one needs to go look at the dims and notice that there's more than meets the eye. When there's no coords at all, the only place to look at is the dims, so I think it's fairly readable. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
260802408 | https://github.com/pydata/xarray/pull/1017#issuecomment-260802408 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2MDgwMjQwOA== | shoyer 1217238 | 2016-11-15T23:20:53Z | 2016-11-15T23:21:06Z | MEMBER | @crusaderky thanks for giving this a try! RE: missing dimension in the repr I like the idea of mirroring I'm less sure about adding markers for empty dimensions to coordinates. That makes for a much longer repr for some simple examples, e.g.,
vs
RE: drop I understand the annoyance of What we could do is add a separate |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
260789194 | https://github.com/pydata/xarray/pull/1017#issuecomment-260789194 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2MDc4OTE5NA== | benbovy 4160723 | 2016-11-15T22:21:58Z | 2016-11-15T22:21:58Z | MEMBER | I also understand (1), but renaming Another suggestion may be to "highlight" in the top list the dimensions which have an index, using the same symbol than in the coordinate list:
|
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
260783017 | https://github.com/pydata/xarray/pull/1017#issuecomment-260783017 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2MDc4MzAxNw== | max-sixty 5635139 | 2016-11-15T21:58:04Z | 2016-11-15T21:58:04Z | MEMBER | I'm a +0.5 on @crusaderky 's (1). Although it's a list of |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
260777664 | https://github.com/pydata/xarray/pull/1017#issuecomment-260777664 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2MDc3NzY2NA== | crusaderky 6213168 | 2016-11-15T21:39:49Z | 2016-11-15T21:39:49Z | MEMBER | I've gone through it and it works great. A couple of very minor grievances: 1 Could you change repr to highlight the dims without coords? It's very easy not to notice them as they exclusively appear in the list on top! e.g. change this
to:
2 Could you change DataArray.drop() and all other similar functions to silently do nothing when you try to drop something that is in the dims but not in the coords? This caused breakages in my code BTW, as it was assuming that a dim always had a matching coord. Specifically, the code that broke was:
I had to change it to:
which is annoyingly ugly. Silently skipping the missing coord is nicer, and makes a lot of sense. (you will still crash if there's no such dim though). |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
260104325 | https://github.com/pydata/xarray/pull/1017#issuecomment-260104325 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI2MDEwNDMyNQ== | shoyer 1217238 | 2016-11-12T06:04:14Z | 2016-11-12T06:04:14Z | MEMBER | I've gone through the docs updated every mention I could find of default indexes. So, I think this really is nearly ready to merge now -- review would be highly appreciated. I've added renderings of a few choice sections of the docs to the top post. The last remaining design decision is how to handle the transition. I would really prefer to avoid a deprecation cycle involving issuing warnings in new users' first encounter with xarray. This means that dependent libraries will need to be updated if this causes them to break (which I think is likely). My best idea is to issue a "beta" release, write a mailing list post and give people lots of time to test and update their packages (a few weeks to a month). |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
258752617 | https://github.com/pydata/xarray/pull/1017#issuecomment-258752617 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI1ODc1MjYxNw== | shoyer 1217238 | 2016-11-07T05:50:06Z | 2016-11-12T05:54:55Z | MEMBER | This is ready for review. (The failing test is unrelated -- a regression in dask.array.) |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
255052837 | https://github.com/pydata/xarray/pull/1017#issuecomment-255052837 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI1NTA1MjgzNw== | benbovy 4160723 | 2016-10-20T09:15:34Z | 2016-10-20T09:15:34Z | MEMBER | +1 for the align error.
Using |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
255029826 | https://github.com/pydata/xarray/pull/1017#issuecomment-255029826 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI1NTAyOTgyNg== | gdementen 832092 | 2016-10-20T07:28:24Z | 2016-10-20T07:28:24Z | NONE |
Yes. But, in that case you need a way to do the "fill with NAN" option without having to jump through too many hoops. How would you do that? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
254834925 | https://github.com/pydata/xarray/pull/1017#issuecomment-254834925 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI1NDgzNDkyNQ== | shoyer 1217238 | 2016-10-19T14:45:25Z | 2016-10-19T14:45:25Z | MEMBER |
@gdementen thanks for the input. I am inclined to agree. Even within the xarray codebase, we basically use
I think we want the error here, given that this is one of the major motivations for allowing missing coordinate labels (not assuming invalid labels). |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
254727789 | https://github.com/pydata/xarray/pull/1017#issuecomment-254727789 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI1NDcyNzc4OQ== | gdementen 832092 | 2016-10-19T06:57:23Z | 2016-10-19T06:57:23Z | NONE | I have never encountered this case yet but ignoring that dimension seems like a bad idea to me. When I use a.reindex_like(b), I usually mean "make a compatible with b", so I assume the resulting index and shape is the same than (or at least compatible with) b. More importantly, I expect to be able to do binary operations between the re-indexed a and b. Ignoring the index like you propose would break that. Given that, I would go with either an error, or treat the missing index like it was range() in this case, ie fill the extra values with NAN. I think I would have a slight preference for the later in my own code (wildcard axes), but in xarray I am unsure. The error might be more coherent. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
254245020 | https://github.com/pydata/xarray/pull/1017#issuecomment-254245020 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI1NDI0NTAyMA== | shoyer 1217238 | 2016-10-17T15:40:00Z | 2016-10-17T15:40:00Z | MEMBER | New design question: What should the new behavior for
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
253791634 | https://github.com/pydata/xarray/pull/1017#issuecomment-253791634 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI1Mzc5MTYzNA== | benbovy 4160723 | 2016-10-14T12:55:21Z | 2016-10-14T12:56:13Z | MEMBER | Oops, I missed |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
253683651 | https://github.com/pydata/xarray/pull/1017#issuecomment-253683651 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI1MzY4MzY1MQ== | shoyer 1217238 | 2016-10-14T01:13:30Z | 2016-10-14T01:13:30Z | MEMBER | @benbovy This is actually a good use case for no dimension labels. E.g., from my working branch: ``` In [7]: da = xr.DataArray(z, dims=('x', 'y'), name='z') In [8]: dz_dx_xarray = da[1:, :] - da[:-1, :] In [9]: dz_dx dz_dx_numpy dz_dx_xarray In [9]: dz_dx_xarray Out[9]: <xarray.DataArray 'z' (x: 4, y: 5)> array([[ 0.15224392, -0.03428312, -0.10936435, 0.06149288, -0.69317859], [-0.61928605, 0.71636887, -0.05578677, -0.39489466, 0.63472963], [ 0.05180684, -0.72471438, 0.64259117, 0.24830877, -0.24006862], [ 0.44981358, 0.19054462, -0.69880118, -0.20120161, 0.08580928]]) In [10]: da.diff('x') Out[10]: <xarray.DataArray 'z' (x: 4, y: 5)> array([[ 0.15224392, -0.03428312, -0.10936435, 0.06149288, -0.69317859], [-0.61928605, 0.71636887, -0.05578677, -0.39489466, 0.63472963], [ 0.05180684, -0.72471438, 0.64259117, 0.24830877, -0.24006862], [ 0.44981358, 0.19054462, -0.69880118, -0.20120161, 0.08580928]]) ``` This does depend on the details of how
The (theoretical) benefit would be an easier transition, because previously As I'm working through porting xarray's test suite, I'm realizing that this may not be the best approach. If a user is relying on Either way, the functionality in your |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
253681755 | https://github.com/pydata/xarray/pull/1017#issuecomment-253681755 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI1MzY4MTc1NQ== | benbovy 4160723 | 2016-10-14T00:58:46Z | 2016-10-14T01:01:07Z | MEMBER |
I think about some possible use cases where this behavior - if I understand it well - may not be desired. For example, if we want to compute partial derivatives by finite difference, using xarray would not give the expected result (as numpy does): ``` python
However, I guess that this specific kind of problem should rather be addressed using the upcoming logic for applying vectorized functions to xarray objects (#964).
That sounds a bit weird to me (I'm not sure to understand, actually). What are the reasons/benefits of returning a |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
249978086 | https://github.com/pydata/xarray/pull/1017#issuecomment-249978086 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI0OTk3ODA4Ng== | rabernat 1197350 | 2016-09-27T19:51:32Z | 2016-09-27T19:51:32Z | MEMBER |
That sounds like the right way to go. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
249908900 | https://github.com/pydata/xarray/pull/1017#issuecomment-249908900 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI0OTkwODkwMA== | shoyer 1217238 | 2016-09-27T15:54:15Z | 2016-09-27T15:54:15Z | MEMBER |
For |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
249867507 | https://github.com/pydata/xarray/pull/1017#issuecomment-249867507 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI0OTg2NzUwNw== | rabernat 1197350 | 2016-09-27T13:39:29Z | 2016-09-27T13:39:29Z | MEMBER | How does one select / slice a dataarray with no index? Does |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
249785809 | https://github.com/pydata/xarray/pull/1017#issuecomment-249785809 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI0OTc4NTgwOQ== | gdementen 832092 | 2016-09-27T07:20:04Z | 2016-09-27T07:21:02Z | NONE | @shoyer Honestly, I have not thought that part (keep the tick labels for subsets) through (since I did not encounter an actual use case for that yet), I was more or less dumping my thought process in case you can make something useful out of it :). Nevertheless, those labels would not necessarily be non-sensical. In your image example above, it seems to me that knowing that the region of the image you are using comes (for example) from the center-right of the original image could be useful information. As for conveying that the dimension is special, I use a "*" next to the axis name to convey that it is a wildcard axis. It seems to go well with my current users. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
249618769 | https://github.com/pydata/xarray/pull/1017#issuecomment-249618769 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI0OTYxODc2OQ== | shoyer 1217238 | 2016-09-26T16:17:28Z | 2016-09-26T16:18:55Z | MEMBER | @gdementen Thanks for chiming in! Yes, in practice I think "no index" for xarray will work almost exactly the same as your "wildcard index".
I'm not a fan of this one. It's a perpetual minor annoyance with pandas to subset a meaningless |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
249498700 | https://github.com/pydata/xarray/pull/1017#issuecomment-249498700 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI0OTQ5ODcwMA== | gdementen 832092 | 2016-09-26T07:31:25Z | 2016-09-26T07:31:25Z | NONE | FWIW, I solved this issue in a slightly different way in my own labelled array project (https://github.com/liam2/larray) (that I still hope to one day merge with xarray -- I will probably need to rewrite my project on top of xarray because the ship as sailed concerning the user-facing API): by default, you get "wildcard" axes, which only have a size and no labels (they do get a range() labels on demand, so you can .sel on that dimension -- to speak in xarray vocabulary). Those wildcard labels are not as picky as normal labels: a wildcard axis compares equal/aligns to other axes as long as it has the same length. In practice, I guess it will be very similar to not having an index at all (and it is probably cleaner this way, but I didn't think of that at the time). All of this to say that yes, this PR is definitely a good idea and would make xarray useful in more situations, as I have hit a lot of cases where real range() labels like you have now made things a lot more painful than necessary. The only advantage I can think of now (except it was easier for me to implement it this way) of having a "wildcard axis" instead of no index/labels at all is that a subset could keep the information about which "tick" it comes from (again without blocking alignment). Not sure it's worth it though (I have actually not implemented it this way yet, but I was contemplating doing so). |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
249435537 | https://github.com/pydata/xarray/pull/1017#issuecomment-249435537 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI0OTQzNTUzNw== | shoyer 1217238 | 2016-09-25T17:51:45Z | 2016-09-26T04:55:13Z | MEMBER |
Basically, this is about the user experience and first impressions. There are very few cases when somebody would prefer a default index to no index at all, so I see few cases for From the experience of new users, it's really nice to be able to incrementally try out features from a new library. Seeing extra information appear in the data model that they didn't add makes people (rightfully) nervous, because they don't know how it will work yet.
Labeled dimensions without coordinate labels actually get you plenty. You get better broadcasting, aggregation (e.g., But the big advantage is the ability to cleanly mix dimensions with and without indexes on the same objects, which covers several more use cases for labeled arrays. Examples off hand include images (see the example from my first post) and machine learning models (where columns usually have labels corresponding to features but rows often are simply unlabeled examples). |
{ "total_count": 3, "+1": 3, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 | |
249419298 | https://github.com/pydata/xarray/pull/1017#issuecomment-249419298 | https://api.github.com/repos/pydata/xarray/issues/1017 | MDEyOklzc3VlQ29tbWVudDI0OTQxOTI5OA== | fmaussion 10050469 | 2016-09-25T12:31:05Z | 2016-09-25T12:31:05Z | MEMBER | I have no use case for this functionality, so I have no strong opinion about it. Two questions though:
- why make it the new default instead of using a keyword (something like |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
WIP: Optional indexes (no more default coordinates given by range(n)) 179052741 |
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 7