home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

2,489 rows where user = 5635139 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: reactions, created_at (date), updated_at (date)

issue >30

  • Faster unstacking 16
  • 0.13.0 release 13
  • Add support for cross product 13
  • rolling_exp (nee ewm) 12
  • Typing for DataArray/Dataset 12
  • cov() and corr() - finalization 12
  • Pytest assert functions 11
  • Align DataArrays based on coords in Dataset constructor 11
  • Feature request: Compute cross-correlation (similar to pd.Series.corr()) of gridded data 10
  • Coarsen keep attrs 3376 10
  • docs consistent with Dataset constructor taking variables 9
  • New function for applying vectorized functions for unlabeled arrays to xarray objects 9
  • Initialize empty or full DataArray 9
  • Silence sphinx warnings 9
  • add typing to unary and binary arithmetic operators 9
  • Detailed report for testing.assert_equal and testing.assert_identical 8
  • Performance: numpy indexes small amounts of data 1000 faster than xarray 8
  • Support keyword API for `Dataset.drop` 8
  • Recreate @gajomi's #2070 to keep attrs when calling astype() 8
  • Display of PeriodIndex 7
  • Explicit indexes in xarray's data-model (Future of MultiIndex) 7
  • Supplying a dataset to the dataset constructor 7
  • Black 7
  • tests for arrays with units 7
  • Opening from zarr.ZipStore fails to read (store???) unicode characters 7
  • Implement idxmax and idxmin functions 7
  • Allow assigning values to a subset of a dataset 7
  • Error concat dataset and dataarray 7
  • Unexpected behavior when using slice in a sel() statement 7
  • Generator for groupby reductions 7
  • …

user 1

  • max-sixty · 2,489 ✖

author_association 1

  • MEMBER 2,489
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
732361140 https://github.com/pydata/xarray/issues/4601#issuecomment-732361140 https://api.github.com/repos/pydata/xarray/issues/4601 MDEyOklzc3VlQ29tbWVudDczMjM2MTE0MA== max-sixty 5635139 2020-11-23T19:00:30Z 2023-09-24T19:44:17Z MEMBER

Great observation @mathause . I think there are two parts of this: - Do we want other libraries which do da.longitude to raise a mypy error? That may be a tradeoff with raising the true error on da.isel - How do we design the type hierarchy? We could add methods to DataWithCoords or add some Dataset_Or_DataArray-like type

Having methods like isel typed would be a win I think

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Don't type check __getattr__? 748684119
732472373 https://github.com/pydata/xarray/issues/4601#issuecomment-732472373 https://api.github.com/repos/pydata/xarray/issues/4601 MDEyOklzc3VlQ29tbWVudDczMjQ3MjM3Mw== max-sixty 5635139 2020-11-23T22:51:38Z 2023-09-24T19:36:02Z MEMBER

Good point re accessors, I hadn't considered those. So sounds like raising an error on da.isel isn't possible regardless...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Don't type check __getattr__? 748684119
1416862557 https://github.com/pydata/xarray/pull/7500#issuecomment-1416862557 https://api.github.com/repos/pydata/xarray/issues/7500 IC_kwDOAMm_X85Uc5td max-sixty 5635139 2023-02-04T22:20:47Z 2023-02-04T22:20:47Z MEMBER

Yes, very much makes sense to copy the netCDF behavior.

I'll let @dcherian comment on the tradeoff. Either warning when reading or adding a prefix sound reasonable (but also probably can be separate PRs, this still seems like an improvement)

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Zarr: drop "source" and "original_shape" from encoding 1571143098
1416861145 https://github.com/pydata/xarray/pull/7500#issuecomment-1416861145 https://api.github.com/repos/pydata/xarray/issues/7500 IC_kwDOAMm_X85Uc5XZ max-sixty 5635139 2023-02-04T22:11:16Z 2023-02-04T22:11:16Z MEMBER

Thanks @observingClouds !

I wasn't paying attention to the original issue so this might be missing things — is there any concern that either of those are on the original zarr and we'd be removing them?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Zarr: drop "source" and "original_shape" from encoding 1571143098
1414554138 https://github.com/pydata/xarray/pull/7499#issuecomment-1414554138 https://api.github.com/repos/pydata/xarray/issues/7499 IC_kwDOAMm_X85UUGIa max-sixty 5635139 2023-02-03T00:35:15Z 2023-02-03T00:35:15Z MEMBER

Thanks @mankoff !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Make text match code example 1568970352
1384575510 https://github.com/pydata/xarray/pull/7445#issuecomment-1384575510 https://api.github.com/repos/pydata/xarray/issues/7445 IC_kwDOAMm_X85ShvIW max-sixty 5635139 2023-01-16T21:32:02Z 2023-01-16T21:32:02Z MEMBER

Thanks @arongergely ! Great to have you as a contributor.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update description of `keep_attrs` parameter in documentation of `apply_ufunc()` 1535425143
1371344257 https://github.com/pydata/xarray/pull/7415#issuecomment-1371344257 https://api.github.com/repos/pydata/xarray/issues/7415 IC_kwDOAMm_X85RvQ2B max-sixty 5635139 2023-01-04T19:42:56Z 2023-01-04T19:42:56Z MEMBER

This has even been fixed since then, but not released. @max-sixty, would it be possible to issue a new release?

This should now be releasing! https://github.com/numbagg/numbagg/releases/tag/v0.2.2

{
    "total_count": 2,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 2,
    "rocket": 0,
    "eyes": 0
}
  install `numbagg` from `conda-forge` 1519058102
1371333954 https://github.com/pydata/xarray/pull/7416#issuecomment-1371333954 https://api.github.com/repos/pydata/xarray/issues/7416 IC_kwDOAMm_X85RvOVC max-sixty 5635139 2023-01-04T19:30:59Z 2023-01-04T19:30:59Z MEMBER

Thanks a lot @keewis , LGTM

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  remove `numbagg` and `numba` from the upstream-dev CI 1519154372
1334523276 https://github.com/pydata/xarray/issues/7344#issuecomment-1334523276 https://api.github.com/repos/pydata/xarray/issues/7344 IC_kwDOAMm_X85PizWM max-sixty 5635139 2022-12-01T22:22:02Z 2022-12-01T22:22:02Z MEMBER

I'd be fine with disabling, since bottleneck doesn't seem to be actively maintained.

Though I would say it's numerically unstable rather than incorrect! I would always want it enabled, but it does make sense to default to the conservative option.

I had dreams of making numbagg into a better bottleneck — it's just as fast, much more flexible, and integrates really well with xarray. But those dreams have not come to pass (yet!).

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Disable bottleneck by default? 1471685307
1334517787 https://github.com/pydata/xarray/pull/7311#issuecomment-1334517787 https://api.github.com/repos/pydata/xarray/issues/7311 IC_kwDOAMm_X85PiyAb max-sixty 5635139 2022-12-01T22:15:48Z 2022-12-01T22:15:48Z MEMBER

Since numba won't support numpy HEAD in general, shall we remove it from the env instead?

Yes, I'll get to it if no one gets there first. I guess we also need to disable those tests

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add numba to nightly upstream 1459938761
1333095874 https://github.com/pydata/xarray/issues/7340#issuecomment-1333095874 https://api.github.com/repos/pydata/xarray/issues/7340 IC_kwDOAMm_X85PdW3C max-sixty 5635139 2022-12-01T03:04:44Z 2022-12-01T03:04:44Z MEMBER

Thanks @mattragoza . Does numpy compute this correctly?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xr.corr produces incorrect output for complex arrays 1470583016
1331538668 https://github.com/pydata/xarray/issues/7336#issuecomment-1331538668 https://api.github.com/repos/pydata/xarray/issues/7336 IC_kwDOAMm_X85PXars max-sixty 5635139 2022-11-30T01:43:21Z 2022-11-30T01:44:52Z MEMBER

This is probably bottleneck: https://github.com/pydata/xarray/issues/7128

Do these reproduce after xr.set_options(use_bottleneck=False)?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Instability when calculating standard deviation 1468838643
1331286574 https://github.com/pydata/xarray/pull/7335#issuecomment-1331286574 https://api.github.com/repos/pydata/xarray/issues/7335 IC_kwDOAMm_X85PWdIu max-sixty 5635139 2022-11-29T20:51:19Z 2022-11-29T20:51:19Z MEMBER

Good idea! 👍

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Enable mypy warn unused ignores 1468671915
1323708057 https://github.com/pydata/xarray/pull/5477#issuecomment-1323708057 https://api.github.com/repos/pydata/xarray/issues/5477 IC_kwDOAMm_X85O5i6Z max-sixty 5635139 2022-11-22T13:49:45Z 2022-11-22T13:49:45Z MEMBER

I would say that a tuple is fine, it IS an iterable of hashable ;)

Sorry, yes, I was unclear above!

How should we handle dimensions which are themselves tuples? (i.e. a really unlikely corner-case, but one that IIRC inspired some of the discussion in https://github.com/pydata/xarray/issues/4821)

My thought was to interpret a tuple as an iterable of dimensions. If we have a dimension name of a tuple, then that requires passing within an Iterable — i.e. the method(dim=[('a','b')]). Since the mypy changes around str | Iterable[Hashable], this seems better than the options I enumerated at https://github.com/pydata/xarray/issues/4821#issuecomment-766166088.

Does that make sense? V possible my writing and / or thinking is still not clear!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix issue tuple as dimension 922926807
1323658973 https://github.com/pydata/xarray/issues/7306#issuecomment-1323658973 https://api.github.com/repos/pydata/xarray/issues/7306 IC_kwDOAMm_X85O5W7d max-sixty 5635139 2022-11-22T13:12:30Z 2022-11-22T13:12:30Z MEMBER

Yes I think this must be a numba issue, since it seems to be raising on just importing numba, and numagg doesn't do anything special there.

I find this quite confusing:

SystemError: initialization of _internal failed without raising an exception

Feels like the opposite of that "Error raised successfully" meme...

I'll raise an issue in numba and see whether anyone recognizes this

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ⚠️ Nightly upstream-dev CI failed ⚠️ 1459698655
1323653994 https://github.com/pydata/xarray/pull/7142#issuecomment-1323653994 https://api.github.com/repos/pydata/xarray/issues/7142 IC_kwDOAMm_X85O5Vtq max-sixty 5635139 2022-11-22T13:08:56Z 2022-11-22T13:08:56Z MEMBER

@shoyer @max-sixty do you know who has rights to change the default branch to main on codecov.io?

I just did this (and ofc happy to give you permission if it's helpful)

Though I still see the issue on main — https://app.codecov.io/gh/pydata/xarray/tree/main?displayType=list (not sure if we're expecting this to be better or not already?)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix Codecov 1401132297
1323638086 https://github.com/pydata/xarray/pull/5477#issuecomment-1323638086 https://api.github.com/repos/pydata/xarray/issues/5477 IC_kwDOAMm_X85O5R1G max-sixty 5635139 2022-11-22T12:56:20Z 2022-11-22T12:56:20Z MEMBER

I think this should be also aligned with str | Iterable[Hashable], so maybe str | DataArray | Iterable[Hashable | DataArray]?

Good point...

IIUC (and it's been a while since I thought through this properly), this would support allowing tuples as dimension names, but forcing them to be passed within an iterable to methods (e.g.method(dim=[('a','b')]) for a dimension named ('a', 'b'). So we'd keep str | Iterable[Hashable], and still raise an error if a tuple was passed directly (i.e. method(dim=('a','b'))

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix issue tuple as dimension 922926807
1320515708 https://github.com/pydata/xarray/pull/7300#issuecomment-1320515708 https://api.github.com/repos/pydata/xarray/issues/7300 IC_kwDOAMm_X85OtXh8 max-sixty 5635139 2022-11-18T20:58:34Z 2022-11-18T20:58:34Z MEMBER

ERROR: Package is too new: flox=0.5 was published on 2022-05-03 which was 12 months ago (policy is 12 months)

I guess that for "experimental" packages like this, we should have different reqs?

(Also the which was 12 months ago seems wrong?)

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  bump min deps 1455786576
1317606451 https://github.com/pydata/xarray/pull/7283#issuecomment-1317606451 https://api.github.com/repos/pydata/xarray/issues/7283 IC_kwDOAMm_X85OiRQz max-sixty 5635139 2022-11-16T20:10:08Z 2022-11-16T20:10:08Z MEMBER

Thanks @headtr1ck !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix mypy 0.990 types 1446613571
1314763403 https://github.com/pydata/xarray/issues/7289#issuecomment-1314763403 https://api.github.com/repos/pydata/xarray/issues/7289 IC_kwDOAMm_X85OXbKL max-sixty 5635139 2022-11-15T04:40:50Z 2022-11-15T04:40:50Z MEMBER

Would you be up for making the change @templiert ?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  typo in xarray/doc/user-guide/reshaping.rst 1449069429
1307719581 https://github.com/pydata/xarray/pull/7267#issuecomment-1307719581 https://api.github.com/repos/pydata/xarray/issues/7267 IC_kwDOAMm_X85N8jed max-sixty 5635139 2022-11-08T19:21:58Z 2022-11-08T19:21:58Z MEMBER

LGTM. Could consider having it be True by default since most attrs will still make sense.

+1 to both the specific point and generally moving in this direction...

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `keep_attrs` for pad 1440354343
1301082744 https://github.com/pydata/xarray/issues/7248#issuecomment-1301082744 https://api.github.com/repos/pydata/xarray/issues/7248 IC_kwDOAMm_X85NjPJ4 max-sixty 5635139 2022-11-02T18:57:48Z 2022-11-02T18:57:48Z MEMBER

Even without looking at the size of the data, the dimensions of the array seem to have grown a lot!

The size of the data seems consistent with that (i.e. 2*27*4*3/2*48*8MB=125GB, though not exactly 58GB, looking at the difference in the "Array Shape" between the two images)

Does looking at the values of the dimension that's grown to size 48 help — are those possibly different, even though you don't intend them to be, and causing it to be huge (but sparse!)?

Does that make sense?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xarray.align Inflating Source NetCDF Data 1433534927
1301073701 https://github.com/pydata/xarray/issues/7247#issuecomment-1301073701 https://api.github.com/repos/pydata/xarray/issues/7247 IC_kwDOAMm_X85NjM8l max-sixty 5635139 2022-11-02T18:48:45Z 2022-11-02T18:48:45Z MEMBER

Closing as unrelated to xarray given https://github.com/pydata/xarray/discussions/7246#discussioncomment-4040351

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Xarray crashed on two computers with different reasons 1433464557
1300964419 https://github.com/pydata/xarray/issues/7247#issuecomment-1300964419 https://api.github.com/repos/pydata/xarray/issues/7247 IC_kwDOAMm_X85NiyRD max-sixty 5635139 2022-11-02T17:21:32Z 2022-11-02T17:21:32Z MEMBER

Ref https://github.com/pydata/xarray/discussions/7246

Does import netCDF4 work? My guess is that the problem is there rather than xarray...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Xarray crashed on two computers with different reasons 1433464557
1292626419 https://github.com/pydata/xarray/issues/7227#issuecomment-1292626419 https://api.github.com/repos/pydata/xarray/issues/7227 IC_kwDOAMm_X85NC-nz max-sixty 5635139 2022-10-26T20:38:25Z 2022-10-26T20:38:25Z MEMBER

IIUC, and I always feel like a newcomer on this stuff — this could be useful for xarray consumers, who could write -> DataArray[Time, Width, Height]?

But without those being generic and "programmable" — i.e. being able to describe that .mean("width") removes the axis called width, it's not that useful for xarray itself?

Is that right?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Typing with Variadic Generics in python 3.11 (PEP 646) 1424215477
1291388733 https://github.com/pydata/xarray/pull/7221#issuecomment-1291388733 https://api.github.com/repos/pydata/xarray/issues/7221 IC_kwDOAMm_X85M-Qc9 max-sixty 5635139 2022-10-26T01:58:00Z 2022-10-26T01:58:00Z MEMBER

Gosh, that's quite dramatic! Impressive find @hmaarrfk. (out of interest, how did you find this?)

I can see how that's quadratic when looping like that. I wonder whether using .assign(var1=1, var2=2, ...) has the same behavior?

Would be interesting to see whether this was covered by our existing asv benchmarks. Would be a good benchmark to add if we don't have one already.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Remove debugging slow assert statement 1423312198
1288442663 https://github.com/pydata/xarray/pull/7204#issuecomment-1288442663 https://api.github.com/repos/pydata/xarray/issues/7204 IC_kwDOAMm_X85MzBMn max-sixty 5635139 2022-10-24T05:33:41Z 2022-10-24T05:33:41Z MEMBER

I have no particular preference on which, but +0.5 on having a standard.

Also PyLance in VSCode has (temporarily, apparently) defaulted to making all imports absolute. So perhaps that will establish a standard.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  absolufy-imports - No relative imports - PEP8 1420242462
1287391823 https://github.com/pydata/xarray/issues/6810#issuecomment-1287391823 https://api.github.com/repos/pydata/xarray/issues/6810 IC_kwDOAMm_X85MvApP max-sixty 5635139 2022-10-21T20:12:30Z 2022-10-21T20:12:30Z MEMBER

Really cool @keewis !

(for others: check out https://github.com/keewis/reportlog-test/issues/1 for an example of it working!)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Convert upstream-dev CI scripts to github Action 1309839509
1282995923 https://github.com/pydata/xarray/pull/7179#issuecomment-1282995923 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85MePbT max-sixty 5635139 2022-10-18T20:58:04Z 2022-10-18T20:58:04Z MEMBER

Do you think there's a risk something gets added back by mistake?

A galaxy brain idea is to have a lint in pre-commit which looks for ^import (foo|bar) for the libraries we should be lazy loading. Not fool proof. Or something to measure import time so we can see if it rises again.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155
1282976254 https://github.com/pydata/xarray/pull/7163#issuecomment-1282976254 https://api.github.com/repos/pydata/xarray/issues/7163 IC_kwDOAMm_X85MeKn- max-sixty 5635139 2022-10-18T20:38:36Z 2022-10-18T20:38:36Z MEMBER

I think you intend to close the wrong issue?

Sorry! Fixed

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add `eval` method to Dataset 1410303926
1281541463 https://github.com/pydata/xarray/issues/7164#issuecomment-1281541463 https://api.github.com/repos/pydata/xarray/issues/7164 IC_kwDOAMm_X85MYsVX max-sixty 5635139 2022-10-17T21:53:55Z 2022-10-17T21:53:55Z MEMBER

I am a bit skeptical - we test a large range of versions and the kinds of warnings we get can be quite different. I fear that we get too many false positives and end up wrapping everything with filterwarnings("ignore").

Yes, very fair.

Though to confirm — this is a concern for the "Warnings from the min-versions test", rather than warnings that xarray issues? Or for both?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Error on xarray warnings in tests? 1410336255
1281527397 https://github.com/pydata/xarray/pull/7179#issuecomment-1281527397 https://api.github.com/repos/pydata/xarray/issues/7179 IC_kwDOAMm_X85MYo5l max-sixty 5635139 2022-10-17T21:36:58Z 2022-10-17T21:36:58Z MEMBER

Very nice @headtr1ck !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy Imports 1412019155
1280193902 https://github.com/pydata/xarray/pull/7172#issuecomment-1280193902 https://api.github.com/repos/pydata/xarray/issues/7172 IC_kwDOAMm_X85MTjVu max-sixty 5635139 2022-10-17T02:34:40Z 2022-10-17T02:34:40Z MEMBER

Nice!!

One would be tempted to think that this is due to xarray.testing and xarray.tutorial but those just move the imports one level down in tuna graphs.

Separate issue, but do these need to be imported into xarray/__init__.py? (I also can't see them in the third graph, but sounds like they're still there)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Lazy import dask.distributed to reduce import time of xarray 1410575877
1280057307 https://github.com/pydata/xarray/pull/7166#issuecomment-1280057307 https://api.github.com/repos/pydata/xarray/issues/7166 IC_kwDOAMm_X85MTB_b max-sixty 5635139 2022-10-16T21:05:24Z 2022-10-16T21:05:24Z MEMBER

OK, let's give this a whirl!

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix doctest warnings, enable errors in CI 1410340285
1280043979 https://github.com/pydata/xarray/issues/7164#issuecomment-1280043979 https://api.github.com/repos/pydata/xarray/issues/7164 IC_kwDOAMm_X85MS-vL max-sixty 5635139 2022-10-16T19:54:28Z 2022-10-16T19:54:28Z MEMBER

There is still the problem that we support several outdated backends that will raise warnings, like pydap the outdated Version thingy. This will also happen in the min-deps builds.

Yes, good point, and I should have added above — it's still possible to ignore warnings at the test site explicitly (@pytest.mark.filterwarnings("ignore:foo"). So it's good, but also a chore, to mark each instance of those...

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Error on xarray warnings in tests? 1410336255
1280031127 https://github.com/pydata/xarray/pull/7166#issuecomment-1280031127 https://api.github.com/repos/pydata/xarray/issues/7166 IC_kwDOAMm_X85MS7mX max-sixty 5635139 2022-10-16T18:57:21Z 2022-10-16T18:57:32Z MEMBER

You can also just remove the example from the docstring, this is on minimal support anyway.

Great, done

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix doctest warnings, enable errors in CI 1410340285
1279869423 https://github.com/pydata/xarray/pull/7166#issuecomment-1279869423 https://api.github.com/repos/pydata/xarray/issues/7166 IC_kwDOAMm_X85MSUHv max-sixty 5635139 2022-10-16T01:45:36Z 2022-10-16T01:45:36Z MEMBER

Currently this raises a deprecation warning: https://github.com/pydata/xarray/blob/50301acd266cbfeb5a59c31f3ddabf2673e127cf/xarray/backends/rasterio_.py#L193

Possibly we add something to the doctest to ignore warnings? It'll be out of place in the docs though...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix doctest warnings, enable errors in CI 1410340285
1278199058 https://github.com/pydata/xarray/pull/6963#issuecomment-1278199058 https://api.github.com/repos/pydata/xarray/issues/6963 IC_kwDOAMm_X85ML8US max-sixty 5635139 2022-10-13T21:29:33Z 2022-10-13T21:29:33Z MEMBER

I can't repro the failure on the current PR v0.17.0-804-g7018b950. I'm using Python 3.9 with the latest dask.

/home/runner/micromamba/envs/xarray-tests/lib/python3.10/site-packages/dask/utils.py:366: error: Parenthesized context managers are only supported in Python 3.9 and greater [syntax] Found 1 error in 1 file (errors prevented further checking)

I'm not sure why it's raising an error for an imported module where --follow-imports=silent. Isn't that supposed to suppress errors in imports?

And weirdly, I get errors running mypy in dask latest main, but not this error!

❯ mypy --python-version 3.8 . dask/system.py:8: error: Unused "type: ignore" comment dask/widgets/__init__.py:20: error: All conditional function variants must have identical signatures [misc] dask/widgets/__init__.py:23: error: All conditional function variants must have identical signatures [misc] dask/layers.py:1322: error: Unused "type: ignore" comment dask/layers.py:1323: error: Unused "type: ignore" comment dask/array/core.py:5814: error: Argument 1 to "ndindex" has incompatible type "Tuple[int, ...]"; expected "SupportsIndex" [arg-type] dask/array/fft.py:196: error: Unused "type: ignore" comment dask/dataframe/core.py:438: error: Unused "type: ignore" comment dask/dataframe/core.py:4186: error: Unused "type: ignore" comment dask/dataframe/core.py:4197: error: Unused "type: ignore" comment dask/dataframe/core.py:4209: error: Unused "type: ignore" comment dask/dataframe/core.py:4408: error: Unused "type: ignore" comment dask/dataframe/core.py:4420: error: Unused "type: ignore" comment dask/dataframe/core.py:4425: error: Unused "type: ignore" comment dask/dataframe/groupby.py:1204: error: Unused "type: ignore" comment dask/dataframe/io/csv.py:9: error: Unused "type: ignore" comment dask/bytes/tests/test_s3.py:380: error: Unused "type: ignore" comment dask/bytes/tests/test_local.py:191: error: Unused "type: ignore" comment dask/bag/tests/test_text.py:33: error: Unused "type: ignore" comment dask/dataframe/tests/test_shuffle.py:1408: error: Unused "type: ignore" comment dask/dataframe/tests/test_shuffle.py:1409: error: Unused "type: ignore" comment dask/dataframe/tests/test_shuffle.py:1412: error: Unused "type: ignore" comment dask/diagnostics/tests/test_profiler.py:21: error: Unused "type: ignore" comment dask/tests/test_graph_manipulation.py:106: error: "tuple" is not subscriptable, use "typing.Tuple" instead [misc] Found 24 errors in 14 files (checked 243 source files)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fixed type errors in `mypy` GitHub Action 1353467346
1278122952 https://github.com/pydata/xarray/pull/6963#issuecomment-1278122952 https://api.github.com/repos/pydata/xarray/issues/6963 IC_kwDOAMm_X85MLpvI max-sixty 5635139 2022-10-13T20:07:43Z 2022-10-13T20:07:43Z MEMBER

Hmmm, these errors should be fixed in the latest version of this PR.

Sorry, my test was on main. I can rerun on this PR.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fixed type errors in `mypy` GitHub Action 1353467346
1278119369 https://github.com/pydata/xarray/pull/6963#issuecomment-1278119369 https://api.github.com/repos/pydata/xarray/issues/6963 IC_kwDOAMm_X85MLo3J max-sixty 5635139 2022-10-13T20:03:50Z 2022-10-13T20:03:50Z MEMBER

I get some errors:

``` ❯ git describe v0.17.0-798-g3599f873

❯ mypy --python-version 3.8 xarray/core/types.py:72: error: "tuple" is not subscriptable [misc] xarray/core/types.py:74: error: "tuple" is not subscriptable [misc] xarray/core/types.py:76: error: "tuple" is not subscriptable [misc] xarray/core/types.py:78: error: "list" is not subscriptable [misc] xarray/core/_reductions.py:18: error: Cannot find implementation or library stub for module named "flox" [import] xarray/core/_reductions.py:18: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports xarray/core/merge.py:43: error: "tuple" is not subscriptable [misc] xarray/core/merge.py:44: error: "tuple" is not subscriptable [misc] xarray/core/merge.py:45: error: "tuple" is not subscriptable [misc] xarray/core/groupby.py:661: error: Cannot find implementation or library stub for module named "flox.xarray" [import] xarray/backends/api.py:65: error: "dict" is not subscriptable [misc] Found 10 errors in 5 files (checked 139 source files) ```

(not sure why git describe is showing that tag but the commit hash should repro)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fixed type errors in `mypy` GitHub Action 1353467346
1277983783 https://github.com/pydata/xarray/issues/7094#issuecomment-1277983783 https://api.github.com/repos/pydata/xarray/issues/7094 IC_kwDOAMm_X85MLHwn max-sixty 5635139 2022-10-13T18:02:16Z 2022-10-13T18:02:16Z MEMBER

Ah excellent, thanks @headtr1ck

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Align typing of dimension inputs 1388372090
1275136361 https://github.com/pydata/xarray/pull/7153#issuecomment-1275136361 https://api.github.com/repos/pydata/xarray/issues/7153 IC_kwDOAMm_X85MAQlp max-sixty 5635139 2022-10-11T18:54:58Z 2022-10-11T18:54:58Z MEMBER

it does not complain, but I don't think it does anything with that (though I didn't verify). Also, I don't really want to issue basically empty releases just for pre-commit (even though technically feasible), so the only option I can see is indeed the status quo.

Great, thanks for chatting about it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  use a hook to synchronize the versions of `black` 1404894283
1275094649 https://github.com/pydata/xarray/pull/7153#issuecomment-1275094649 https://api.github.com/repos/pydata/xarray/issues/7153 IC_kwDOAMm_X85MAGZ5 max-sixty 5635139 2022-10-11T18:17:21Z 2022-10-11T18:17:21Z MEMBER

Unless you meant that black should be installed together with blackdoc? If that was the question: it already is, but will only be updated together with blackdoc, so now that I think of it that might actually make pinning in blackdoc redundant?

Without pinning black in additional_dependencies, which version is used? I think the issue might be that the latest version is used based on when it's installed. But that means that different people will have different versions. And so if we pin it within blackdoc, then people can't upgrade black without a new release of blackdoc. And so we're in this spot where each user needs to pin it within their .pre-commit-config.yaml.

Does pre-commit support additional_dependencies defined by the hook? I couldn't find it in https://pre-commit.com/#creating-new-hooks. That would solve this.

Otherwise I guess you could have a bot which released a new version of blackdoc pinned to each specific version of black. But the status quo seems OK too.

Ref https://github.com/pre-commit/pre-commit/issues/2082

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  use a hook to synchronize the versions of `black` 1404894283
1275059210 https://github.com/pydata/xarray/pull/7153#issuecomment-1275059210 https://api.github.com/repos/pydata/xarray/issues/7153 IC_kwDOAMm_X85L_9wK max-sixty 5635139 2022-10-11T17:47:02Z 2022-10-11T17:47:02Z MEMBER

As a great fan of blackdoc, can I ask a general question re blackdoc & pre-commit? Why not have the black dependency defined in the blackdoc requirements, so it gets installed without requiring additional-dependencies?

Is ti something to do with allowing people to use an old version of black with a new version of blackdoc, such that we don't want to have too aggressive a requirement?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  use a hook to synchronize the versions of `black` 1404894283
1272606108 https://github.com/pydata/xarray/issues/7094#issuecomment-1272606108 https://api.github.com/repos/pydata/xarray/issues/7094 IC_kwDOAMm_X85L2m2c max-sixty 5635139 2022-10-09T18:51:52Z 2022-10-09T18:51:52Z MEMBER

Usually we do not use len(input) or x in input though. Maybe reversible container or something else exists?

We can build a list if we need a len? Or IIRC there is a Sized type — a Set but not an Iterable.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Align typing of dimension inputs 1388372090
1272366287 https://github.com/pydata/xarray/issues/7146#issuecomment-1272366287 https://api.github.com/repos/pydata/xarray/issues/7146 IC_kwDOAMm_X85L1sTP max-sixty 5635139 2022-10-08T17:43:18Z 2022-10-08T17:43:18Z MEMBER

Thanks @d1mach . Could it be related to https://github.com/pydata/xarray/issues/7136 ?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Segfault writing large netcdf files to s3fs 1402002645
1272362257 https://github.com/pydata/xarray/issues/7146#issuecomment-1272362257 https://api.github.com/repos/pydata/xarray/issues/7146 IC_kwDOAMm_X85L1rUR max-sixty 5635139 2022-10-08T17:20:00Z 2022-10-08T17:20:00Z MEMBER

That's quite an old version of xarray! Could we confirm it has similar results on a more recent version?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Segfault writing large netcdf files to s3fs 1402002645
1267449828 https://github.com/pydata/xarray/pull/7052#issuecomment-1267449828 https://api.github.com/repos/pydata/xarray/issues/7052 IC_kwDOAMm_X85Li7_k max-sixty 5635139 2022-10-04T18:55:34Z 2022-10-04T18:55:34Z MEMBER

Excellent! Should we hit the green button?

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add typing to plot methods 1377128403
1267445604 https://github.com/pydata/xarray/pull/7123#issuecomment-1267445604 https://api.github.com/repos/pydata/xarray/issues/7123 IC_kwDOAMm_X85Li69k max-sixty 5635139 2022-10-04T18:51:16Z 2022-10-04T18:51:16Z MEMBER

Excellent @DanielGoman !

(not to use xarray to tout my personal projects — but re the doctest failures — running https://github.com/max-sixty/pytest-accept over them will auto-fix them, if that's helpful)

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: Added examples to docstrings of DataArray methods (#7123) 1396401446
1267369675 https://github.com/pydata/xarray/pull/7120#issuecomment-1267369675 https://api.github.com/repos/pydata/xarray/issues/7120 IC_kwDOAMm_X85LiobL max-sixty 5635139 2022-10-04T18:07:55Z 2022-10-04T18:07:55Z MEMBER

Thanks a lot @patrick-naylor !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More informative error for passing a list to dataset.transpose 1395478084
1266523363 https://github.com/pydata/xarray/pull/7120#issuecomment-1266523363 https://api.github.com/repos/pydata/xarray/issues/7120 IC_kwDOAMm_X85LfZzj max-sixty 5635139 2022-10-04T07:30:20Z 2022-10-04T07:30:20Z MEMBER

Here's a fix of the type checker and a small suggestion (feel free to accept or reject!)

```diff commit 5dad26e19f1fb22e9a31854bac9471c5e1bec43c Author: Maximilian Roos m@maxroos.com Date: Tue Oct 4 00:26:48 2022 -0700

Ignore type on intentional error; (optional) tweak to error message

diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index ff54bd84..a3f26d26 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -5405,7 +5405,7 @@ def transpose( if (len(dims) > 0) and (isinstance(dims[0], list)): list_fix = [f"'{x}'" if isinstance(x, str) else f"{x}" for x in dims[0]] raise TypeError( - f'transpose requires dims to be passed as multiple arguments. Expected "{", ".join(list_fix)}". Received "{dims[0]}" instead' + f'transpose requires dims to be passed as multiple arguments. Expected .transpose({", ".join(list_fix)}). Received .transpose({dims[0]}) instead' )

     # Use infix_dims to check once for missing dimensions

diff --git a/xarray/tests/test_dataset.py b/xarray/tests/test_dataset.py index 6ac5ed06..8acd3798 100644 --- a/xarray/tests/test_dataset.py +++ b/xarray/tests/test_dataset.py @@ -6809,7 +6809,7 @@ def test_string_keys_typing() -> None: ds.assign(variables=mapping)

-def test_traspose_error() -> None: +def test_transpose_error() -> None: # Transpose dataset with list as argument # Should raise error ds = xr.Dataset({"foo": (("x", "y"), [[21]]), "bar": (("x", "y"), [[12]])}) @@ -6817,7 +6817,7 @@ def test_traspose_error() -> None: with pytest.raises( TypeError, match=re.escape( - "transpose requires dims to be passed as multiple arguments. Expected \"'y', 'x'\". Received \"['y', 'x']\" instead" + "transpose requires dims to be passed as multiple arguments. Expected .transpose('y', 'x'). Received .transpose(['y', 'x']) instead" ), ): - ds.transpose(["y", "x"]) + ds.transpose(["y", "x"]) # type: ignore

```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More informative error for passing a list to dataset.transpose 1395478084
1265870394 https://github.com/pydata/xarray/pull/7117#issuecomment-1265870394 https://api.github.com/repos/pydata/xarray/issues/7117 IC_kwDOAMm_X85Lc6Y6 max-sixty 5635139 2022-10-03T18:35:37Z 2022-10-03T18:35:37Z MEMBER

(FYI I had been the mypy person here — for my sins — but I think this is beyond my understanding — so putting an issue into mypy might be the best path forward on the cache issue...)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Expermimental mypy plugin 1395053809
1264695355 https://github.com/pydata/xarray/pull/7114#issuecomment-1264695355 https://api.github.com/repos/pydata/xarray/issues/7114 IC_kwDOAMm_X85LYbg7 max-sixty 5635139 2022-10-02T17:36:52Z 2022-10-02T17:36:52Z MEMBER

Very impressive and thorough @headtr1ck , thank you...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix typing of backends 1393837094
1264693714 https://github.com/pydata/xarray/issues/7096#issuecomment-1264693714 https://api.github.com/repos/pydata/xarray/issues/7096 IC_kwDOAMm_X85LYbHS max-sixty 5635139 2022-10-02T17:27:33Z 2022-10-02T17:27:33Z MEMBER

I got the same result in riscv64. One thing I could guess is that the sign bit of NaN is not kept during conversions. Some more details could be found at

Thanks for trying that. Notably, that code doesn't have xarray in. So I'm keen to be part of the solution, but it doesn't look to be a problem with xarray code specifically. Let me know if that makes sense.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Handle NaNs when decoding times (failures on riscv64) 1389019400
1264535517 https://github.com/pydata/xarray/issues/7096#issuecomment-1264535517 https://api.github.com/repos/pydata/xarray/issues/7096 IC_kwDOAMm_X85LX0fd max-sixty 5635139 2022-10-02T02:47:22Z 2022-10-02T02:47:22Z MEMBER

Closing but please feel free to reopen

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Handle NaNs when decoding times (failures on riscv64) 1389019400
1264534707 https://github.com/pydata/xarray/pull/7112#issuecomment-1264534707 https://api.github.com/repos/pydata/xarray/issues/7112 IC_kwDOAMm_X85LX0Sz max-sixty 5635139 2022-10-02T02:42:44Z 2022-10-02T02:42:44Z MEMBER

Looks excellent!

(there are a few tests commented out, not sure whether that's intentional...)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Support of repr and deepcopy of recursive arrays 1393443839
1263967757 https://github.com/pydata/xarray/issues/7111#issuecomment-1263967757 https://api.github.com/repos/pydata/xarray/issues/7111 IC_kwDOAMm_X85LVp4N max-sixty 5635139 2022-09-30T19:59:05Z 2022-09-30T19:59:05Z MEMBER

Hmmm, python seems to deal with this reasonably for its builtins:

```python In [1]: a = [1]

In [2]: b = [a]

In [3]: a.append(b)

In [4]: import copy

In [5]: copy.deepcopy(a) Out[5]: [1, [[...]]] ```

I doubt this is getting hit that much given it requires a recursive data structure, but it does seem like a gnarly error.

Is there some feature that python uses to check whether a data structure is recursive when it's copying, which we're not taking advantage of? I can look more later.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  New deep copy behavior in 2022.9.0 causes maximum recursion error 1392878100
1263807395 https://github.com/pydata/xarray/issues/7108#issuecomment-1263807395 https://api.github.com/repos/pydata/xarray/issues/7108 IC_kwDOAMm_X85LVCuj max-sixty 5635139 2022-09-30T16:59:06Z 2022-09-30T16:59:06Z MEMBER

Float indexes are often a source of pain, unfortunately!

...also for my ability to know what's going on, apparently :). Thanks a lot @benbovy .


Yes, that would be great to raise a more informative error. We could also put an issue in upstream if pandas itself has the same issue.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  .sel return errors when using floats for no apparent reason 1391699976
1263070017 https://github.com/pydata/xarray/issues/7108#issuecomment-1263070017 https://api.github.com/repos/pydata/xarray/issues/7108 IC_kwDOAMm_X85LSOtB max-sixty 5635139 2022-09-30T03:49:51Z 2022-09-30T03:49:51Z MEMBER

Ah, right. Does it select a value with just nc_bug.sel(lon = 161.001, tolerance=0.1)? Because the lon value which that selects is probably the value you need to use in the slice.

Float indexes are often a source of pain, unfortunately!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  .sel return errors when using floats for no apparent reason 1391699976
1263040310 https://github.com/pydata/xarray/issues/7108#issuecomment-1263040310 https://api.github.com/repos/pydata/xarray/issues/7108 IC_kwDOAMm_X85LSHc2 max-sixty 5635139 2022-09-30T02:47:13Z 2022-09-30T02:47:13Z MEMBER

Generally this is because the floats aren't exactly the same value — does passing tolerance=0.1 help?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  .sel return errors when using floats for no apparent reason 1391699976
1261481952 https://github.com/pydata/xarray/issues/7096#issuecomment-1261481952 https://api.github.com/repos/pydata/xarray/issues/7096 IC_kwDOAMm_X85LMK_g max-sixty 5635139 2022-09-28T21:26:09Z 2022-09-28T21:26:09Z MEMBER

I'm not sure what that has to do with xarray though? Does this give the same result?

import numpy as np import pandas as pd num_dates = np.asarray([0., np.nan]) flat_num_dates = num_dates.ravel() flat_num_dates_ns_int = (flat_num_dates * (int(1e9) * 60 * 60 * 24)).astype(np.int64) flat_num_dates_ns_int array([ 0, 9223372036854775807])

Please could you answer the question on whether pandas tests pass?

We're here helping as volunteers; we can only engage on issues if you reciprocate our good faith. Please could you answer this?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Handle NaNs when decoding times (failures on riscv64) 1389019400
1261412104 https://github.com/pydata/xarray/issues/7096#issuecomment-1261412104 https://api.github.com/repos/pydata/xarray/issues/7096 IC_kwDOAMm_X85LL58I max-sixty 5635139 2022-09-28T20:07:57Z 2022-09-28T20:07:57Z MEMBER

What are the bogus values?

Please could you answer the question on whether pandas tests pass?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Handle NaNs when decoding times (failures on riscv64) 1389019400
1261237590 https://github.com/pydata/xarray/issues/7096#issuecomment-1261237590 https://api.github.com/repos/pydata/xarray/issues/7096 IC_kwDOAMm_X85LLPVW max-sixty 5635139 2022-09-28T17:34:03Z 2022-09-28T17:34:03Z MEMBER

It looks lie many of these occur in pandas code — do pandas tests pass?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Handle NaNs when decoding times (failures on riscv64) 1389019400
1261236242 https://github.com/pydata/xarray/issues/7071#issuecomment-1261236242 https://api.github.com/repos/pydata/xarray/issues/7071 IC_kwDOAMm_X85LLPAS max-sixty 5635139 2022-09-28T17:32:38Z 2022-09-28T17:32:38Z MEMBER

Agree with (1) or (3). I do (1) a lot, no harm in adding it to xarray.

I could also imagine (2) with options for backends (e.g. pandas as one option). But I would vote against developing our own.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Should Xarray have a read_csv method? 1383037028
1257270633 https://github.com/pydata/xarray/pull/7052#issuecomment-1257270633 https://api.github.com/repos/pydata/xarray/issues/7052 IC_kwDOAMm_X85K8G1p max-sixty 5635139 2022-09-25T20:14:08Z 2022-09-25T20:14:08Z MEMBER

One point aside — when this is done, we may be able to turn on mypy's strict mode, at least for the tests path, so then tests always need annotations, and our annotations get tested.

(for context, a year ago or so we found some of them were wrong, but weren't being tested, because -> None wasn't in the tests)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add typing to plot methods 1377128403
1254171024 https://github.com/pydata/xarray/pull/7063#issuecomment-1254171024 https://api.github.com/repos/pydata/xarray/issues/7063 IC_kwDOAMm_X85KwSGQ max-sixty 5635139 2022-09-21T20:03:37Z 2022-09-21T20:03:37Z MEMBER

Thanks @slevang ! Feel free to add a whatsnew, no requirement to though, we'll merge this shortly either way

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Better dtype preservation for rolling mean on dask array 1381297782
1252968375 https://github.com/pydata/xarray/pull/7060#issuecomment-1252968375 https://api.github.com/repos/pydata/xarray/issues/7060 IC_kwDOAMm_X85Krse3 max-sixty 5635139 2022-09-20T22:11:02Z 2022-09-20T22:11:02Z MEMBER

(if you want to add a whatsnew then great, no problem if not, I'll set it to merge when tests complete)

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More informative error for non-existent zarr store 1380016376
1252967660 https://github.com/pydata/xarray/pull/7060#issuecomment-1252967660 https://api.github.com/repos/pydata/xarray/issues/7060 IC_kwDOAMm_X85KrsTs max-sixty 5635139 2022-09-20T22:10:22Z 2022-09-20T22:10:22Z MEMBER

Thanks a lot @slevang !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More informative error for non-existent zarr store 1380016376
1252966690 https://github.com/pydata/xarray/pull/7052#issuecomment-1252966690 https://api.github.com/repos/pydata/xarray/issues/7052 IC_kwDOAMm_X85KrsEi max-sixty 5635139 2022-09-20T22:09:27Z 2022-09-20T22:09:27Z MEMBER

Congrats for doing all these!! This must be (almost?) the last of untyped modules?

{
    "total_count": 2,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 2,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add typing to plot methods 1377128403
1252964437 https://github.com/pydata/xarray/pull/7051#issuecomment-1252964437 https://api.github.com/repos/pydata/xarray/issues/7051 IC_kwDOAMm_X85KrrhV max-sixty 5635139 2022-09-20T22:06:53Z 2022-09-20T22:06:53Z MEMBER

Nothing wrong with None, it is just pythons default.

The intention of replace_none=False was to leave None as None, which is important for some low level functions as they might be optimized (like numpy sum, which sums over all axes for None).

Not relevant to this PR but for background — it used to be that da.groupby() defaulted to None, and reduced all dimensions — now for a couple of years we require ....

But still da.sum() is equivalent to da.sum(...), which is arguably a bit incongruent with da.sum('a') reducing fewer dimensions than da.sum(['a','b']). But would be quite hard to change now.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add parse_dims func 1377097243
1252829551 https://github.com/pydata/xarray/pull/7051#issuecomment-1252829551 https://api.github.com/repos/pydata/xarray/issues/7051 IC_kwDOAMm_X85KrKlv max-sixty 5635139 2022-09-20T19:47:20Z 2022-09-20T19:47:20Z MEMBER

I always thought that these two methods are incompatible. But I guess ... Is synonym for None (= all dims) and if ... Appears in an iterable, it just means replace it with all leftover dims.

Yes! ... is the better synonym — None is somewhat an artifact of history. So +1 for replace_none, which maybe we can gradually turn to False by default over time.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add parse_dims func 1377097243
1250129625 https://github.com/pydata/xarray/pull/7048#issuecomment-1250129625 https://api.github.com/repos/pydata/xarray/issues/7048 IC_kwDOAMm_X85Kg3bZ max-sixty 5635139 2022-09-17T19:38:08Z 2022-09-17T19:38:08Z MEMBER

Here's the diff from pytest-accept (it is weird that it's slightly different on windows...)

```diff commit 83615a94a6b7c0ae0cf0e0240d7705d9ce6c21e5 Author: Maximilian Roos m@maxroos.com Date: Sat Sep 17 12:36:45 2022 -0700

pytest-accept

diff --git a/xarray/core/_reductions.py b/xarray/core/_reductions.py index a7cf7ec2..d0c2a9d7 100644 --- a/xarray/core/_reductions.py +++ b/xarray/core/_reductions.py @@ -97,7 +97,7 @@ def count( <xarray.Dataset> Dimensions: () Data variables: - da int32 5 + da int64 5 """ return self.reduce( duck_array_ops.count, @@ -4400,7 +4400,7 @@ def count(

     >>> da.groupby("labels").count()
     <xarray.DataArray (labels: 3)>
  • array([1, 2, 2], dtype=int64)
  • array([1, 2, 2]) Coordinates: * labels (labels) object 'a' 'b' 'c' """ @@ -5485,7 +5485,7 @@ def count(
     >>> da.resample(time="3M").count()
     <xarray.DataArray (time: 3)>
    
    • array([1, 3, 1], dtype=int64)
    • array([1, 3, 1]) Coordinates:
      • time (time) datetime64[ns] 2001-01-31 2001-04-30 2001-07-31 """ ```
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add Ellipsis typehint to reductions 1376479521
1249929257 https://github.com/pydata/xarray/issues/7045#issuecomment-1249929257 https://api.github.com/repos/pydata/xarray/issues/7045 IC_kwDOAMm_X85KgGgp max-sixty 5635139 2022-09-16T23:14:26Z 2022-09-16T23:14:26Z MEMBER

I think I really empathize with the pain here. There's a very real explicitness vs "helpfulness" tradeoff, often depending on whether people are doing exploratory research vs hardened production (a bit like Ask vs Guess culture!).

But from the perspective of someone who works with lots of people who use Xarray for their daily research, I think this would be a big hurdle, even without considering the change costs.

One analogy is xarray vs. pandas for 2D data — among my colleagues xarray is known to be a smaller, more reliable API surface, while pandas is more fully featured but also a maze of surprising methods and behavior (df['a'] * df!). Forcing explicit alignment would strengthen that case. But it could take it too far — operations that you expect to just work would now need nannying.

"Make another mode" can seem like an easy decision — "who doesn't want another mode" — but it could make development more difficult, since we'd need calls to check which mode we're in & tests for those. It's not insurmountable though, and maybe it would only be required in a couple of methods, so testing those would be sufficient to ensure the resulting behavior would be correct?

(FWIW we don't use float indexes, so it could be fine to dispense with those)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Should Xarray stop doing automatic index-based alignment? 1376109308
1249855286 https://github.com/pydata/xarray/pull/7048#issuecomment-1249855286 https://api.github.com/repos/pydata/xarray/issues/7048 IC_kwDOAMm_X85Kf0c2 max-sixty 5635139 2022-09-16T21:46:16Z 2022-09-16T21:46:16Z MEMBER

Excellent @headtr1ck !

Do we need to run pytest --accept to get the docstrings? It looks like we lost lots...

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 1
}
  Add Ellipsis typehint to reductions 1376479521
1242967809 https://github.com/pydata/xarray/pull/7017#issuecomment-1242967809 https://api.github.com/repos/pydata/xarray/issues/7017 IC_kwDOAMm_X85KFi8B max-sixty 5635139 2022-09-11T13:40:01Z 2022-09-11T13:40:01Z MEMBER

That makes sense. Until mypy make the change, I think this is a nice signpost for users, and will be easily forward compatible…

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add Ellipsis typehints 1368690120
1236843454 https://github.com/pydata/xarray/pull/6986#issuecomment-1236843454 https://api.github.com/repos/pydata/xarray/issues/6986 IC_kwDOAMm_X85JuLu- max-sixty 5635139 2022-09-05T10:52:42Z 2022-09-05T10:52:42Z MEMBER

Thanks a lot @headtr1ck !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Remove some warnings in tests 1361262641
1222172998 https://github.com/pydata/xarray/pull/6938#issuecomment-1222172998 https://api.github.com/repos/pydata/xarray/issues/6938 IC_kwDOAMm_X85I2OFG max-sixty 5635139 2022-08-22T10:39:50Z 2022-08-22T10:39:50Z MEMBER

Great, thanks @headtr1ck ! And for the typing too

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix bug where indexes were changed inplace 1345220697
1213445477 https://github.com/pydata/xarray/pull/6912#issuecomment-1213445477 https://api.github.com/repos/pydata/xarray/issues/6912 IC_kwDOAMm_X85IU7Vl max-sixty 5635139 2022-08-12T19:27:02Z 2022-08-12T19:27:02Z MEMBER

@max-sixty you will probably enjoy this extra automation 🤖

Haha thanks!! Prayers do get answered.

I guess it's imperfect if it's just doing the robotic thing — a formatting PR is going to get a whole lot of labels — ideally the process would understand its weight. But let's definitely give it a go!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Automatic PR labeler 1337587854
1210216148 https://github.com/pydata/xarray/issues/6904#issuecomment-1210216148 https://api.github.com/repos/pydata/xarray/issues/6904 IC_kwDOAMm_X85IIm7U max-sixty 5635139 2022-08-10T06:24:54Z 2022-08-10T06:24:54Z MEMBER

Re nearest, does it replicate with exact lookups?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `sel` behaving randomly when applying to a dataset with multiprocessing 1333650265
1209921400 https://github.com/pydata/xarray/issues/6904#issuecomment-1209921400 https://api.github.com/repos/pydata/xarray/issues/6904 IC_kwDOAMm_X85IHe94 max-sixty 5635139 2022-08-09T21:39:21Z 2022-08-09T21:39:21Z MEMBER

That sounds quite unfriendly!

A couple of questions to reduce the size of the example, without providing any answers yet unfortunately:

  • Is process_map from tqdm? Do you get the same behavior from the standard multiprocessing?
  • What if we remove method=nearest?
  • Is the file a single netCDF file?
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `sel` behaving randomly when applying to a dataset with multiprocessing 1333650265
1204216812 https://github.com/pydata/xarray/pull/6823#issuecomment-1204216812 https://api.github.com/repos/pydata/xarray/issues/6823 IC_kwDOAMm_X85HxuPs max-sixty 5635139 2022-08-03T16:46:19Z 2022-08-03T16:46:19Z MEMBER

Great idea — doing anything that's expensive on repr has caught us a couple of times and can be a frustrating perf issue. Thanks @Illviljan !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on array backend for string formatting 1316549018
1197235842 https://github.com/pydata/xarray/pull/6841#issuecomment-1197235842 https://api.github.com/repos/pydata/xarray/issues/6841 IC_kwDOAMm_X85HXF6C max-sixty 5635139 2022-07-27T18:55:12Z 2022-07-27T18:55:12Z MEMBER

Thanks @raybellwaves !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DOC: link DataArray.expand_dims to Dataset.expand_dims 1319991672
1197129426 https://github.com/pydata/xarray/issues/6833#issuecomment-1197129426 https://api.github.com/repos/pydata/xarray/issues/6833 IC_kwDOAMm_X85HWr7S max-sixty 5635139 2022-07-27T18:15:00Z 2022-07-27T18:15:00Z MEMBER

If this is helpful to anyone, here are some configs I use to: a) avoid opening a browser b) avoid pushing to main

This will push the current branch, and tell GH to merge as soon as test pass. I never feel the need to push to main now; even something like the release cleanup can be done through an PR.

pub-merge-gh = !git publish && gh pr create --fill && gh pr merge --auto --squash --delete-branch publish = "!git push --set-upstream origin $(git branch --show-current)"

(the latter can be replaced with push with the latest version of git & [push]; autoSetupRemote = true configs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Require a pull request before merging to main 1318800553
1194808796 https://github.com/pydata/xarray/issues/6826#issuecomment-1194808796 https://api.github.com/repos/pydata/xarray/issues/6826 IC_kwDOAMm_X85HN1Xc max-sixty 5635139 2022-07-26T00:20:08Z 2022-07-26T00:20:08Z MEMBER

The difference is that one has a name of 0:

```python

In [7]: da.sel(x=0) Out[7]: <xarray.DataArray (y: 2)> array([1, 2]) Dimensions without coordinates: y

In [8]: da.to_dataset(dim='x')[0] Out[8]: <xarray.DataArray 0 (y: 2)> array([1, 2]) Dimensions without coordinates: y

In [9]: da.to_dataset(dim='x')[0].name Out[9]: 0

```

This shouldn't prevent the plotting from working — that is indeed a bug....

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Success of DataArray.plot() depends on object's history.  1317502063
1193383580 https://github.com/pydata/xarray/pull/6821#issuecomment-1193383580 https://api.github.com/repos/pydata/xarray/issues/6821 IC_kwDOAMm_X85HIZac max-sixty 5635139 2022-07-24T19:52:25Z 2022-07-24T19:52:25Z MEMBER

Sorry, I just read through #6818, mea culpa. It's really unlucky to have a "hole" between releases that pass!

If we've already done the work, then we may as well merge? And then after the next release we can bump the version, such that our latest release for numpy 1.20 works?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix numpy 1.20 incompatibility 1315959612
1193371320 https://github.com/pydata/xarray/pull/6821#issuecomment-1193371320 https://api.github.com/repos/pydata/xarray/issues/6821 IC_kwDOAMm_X85HIWa4 max-sixty 5635139 2022-07-24T18:34:40Z 2022-07-24T18:34:40Z MEMBER

Are we still supporting numpy 1.20? If we are, presumably it should be covered in our min-versions CI?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix numpy 1.20 incompatibility 1315959612
1179445439 https://github.com/pydata/xarray/issues/6625#issuecomment-1179445439 https://api.github.com/repos/pydata/xarray/issues/6625 IC_kwDOAMm_X85GTOi_ max-sixty 5635139 2022-07-09T00:41:53Z 2022-07-09T00:41:53Z MEMBER

I'll close but please open an bug report if we do see it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Why am I getting 'Passing method to Float64Index.get_loc is deprecated' error when using the .sel method to extract some data, and how do I solve it? 1244030662
1179445376 https://github.com/pydata/xarray/issues/6625#issuecomment-1179445376 https://api.github.com/repos/pydata/xarray/issues/6625 IC_kwDOAMm_X85GTOiA max-sixty 5635139 2022-07-09T00:41:32Z 2022-07-09T00:41:32Z MEMBER

I'm not sure on the exact version — but do we see this in the latest release? https://github.com/pydata/xarray/releases/tag/v2022.03.0

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Why am I getting 'Passing method to Float64Index.get_loc is deprecated' error when using the .sel method to extract some data, and how do I solve it? 1244030662
1176477717 https://github.com/pydata/xarray/issues/6754#issuecomment-1176477717 https://api.github.com/repos/pydata/xarray/issues/6754 IC_kwDOAMm_X85GH6AV max-sixty 5635139 2022-07-06T17:12:25Z 2022-07-06T17:12:25Z MEMBER

I would say very little. I'm a lazy programmer.

Haha, us both Ray!

I do think that part of laziness is not having to remember too much — so hopefully I can trade you the costs of an extra method call for more consistency!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  to_array to create a dimension as last axis 1294978633
1176402083 https://github.com/pydata/xarray/pull/5540#issuecomment-1176402083 https://api.github.com/repos/pydata/xarray/issues/5540 IC_kwDOAMm_X85GHnij max-sixty 5635139 2022-07-06T16:00:08Z 2022-07-06T16:00:08Z MEMBER

Resurrecting this, as discussed on the dev call.

Could we replace the pandas decorator with the one from the standard library? That may require adding __dict__ as a slot.

Then as long as the benchmarks still look good, there was consensus that we should merge.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Cache some properties 930918574
1175783623 https://github.com/pydata/xarray/issues/6754#issuecomment-1175783623 https://api.github.com/repos/pydata/xarray/issues/6754 IC_kwDOAMm_X85GFQjH max-sixty 5635139 2022-07-06T05:01:48Z 2022-07-06T05:01:48Z MEMBER

What's the advantage of this over the transpose call?

The transpose approach is more modular, since it takes advantage of the orthogonality of the methods — i.e. we have one method for all usages, rather than kwargs in lots of methods.

We've also managed to have axis as a hidden implentation detail, and this would start exposing it.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  to_array to create a dimension as last axis 1294978633
1172339599 https://github.com/pydata/xarray/pull/6730#issuecomment-1172339599 https://api.github.com/repos/pydata/xarray/issues/6730 IC_kwDOAMm_X85F4HuP max-sixty 5635139 2022-07-01T13:17:28Z 2022-07-01T13:17:28Z MEMBER

Don't put such decisions on a mere mortal!

I would say switch given it sounds like da & ds caused some confusion. Even if personally I was OK with da & ds

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  move da and ds fixtures to conftest.py 1285767883
1172312204 https://github.com/pydata/xarray/pull/6730#issuecomment-1172312204 https://api.github.com/repos/pydata/xarray/issues/6730 IC_kwDOAMm_X85F4BCM max-sixty 5635139 2022-07-01T12:49:59Z 2022-07-01T12:49:59Z MEMBER

Yes, agree they are not imported — good point but I think this would be OK

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  move da and ds fixtures to conftest.py 1285767883
1167843189 https://github.com/pydata/xarray/pull/6730#issuecomment-1167843189 https://api.github.com/repos/pydata/xarray/issues/6730 IC_kwDOAMm_X85Fm991 max-sixty 5635139 2022-06-27T20:20:31Z 2022-06-27T20:20:31Z MEMBER

your suggestion would be to name them dataarray and dataset?

That would be great I think!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  move da and ds fixtures to conftest.py 1285767883
1167650213 https://github.com/pydata/xarray/pull/6730#issuecomment-1167650213 https://api.github.com/repos/pydata/xarray/issues/6730 IC_kwDOAMm_X85FmO2l max-sixty 5635139 2022-06-27T17:28:54Z 2022-06-27T17:28:54Z MEMBER

I agree with moving them!

But I haven't seen ..._fixture in pytest before, and it makes the names longer — could I ask what the benefit of that is? If we wanted dataarray & dataset then that would be fine...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  move da and ds fixtures to conftest.py 1285767883
1163311176 https://github.com/pydata/xarray/issues/6704#issuecomment-1163311176 https://api.github.com/repos/pydata/xarray/issues/6704 IC_kwDOAMm_X85FVrhI max-sixty 5635139 2022-06-22T16:06:13Z 2022-06-22T16:06:13Z MEMBER

As discussed on the call: - We'd like to move to .rename and .rename_vars as separate methods on DataArray; the latter renaming coords. - We would "soft-deprecate" .rename for renaming coords — i.e. remove documentation, but not give any warnings, at least for a while. This was a successful approach for .drop. - .rename_vars is a slightly odd name given there are only coords. But it's consistent with xr.Dataset.

After the call, I realize that I didn't mention that Dataset.rename is a synonym for Dataset.rename_vars. Would be also soft deprecate Dataset.rename?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Future of `DataArray.rename` 1275752720
1163305223 https://github.com/pydata/xarray/pull/6706#issuecomment-1163305223 https://api.github.com/repos/pydata/xarray/issues/6706 IC_kwDOAMm_X85FVqEH max-sixty 5635139 2022-06-22T16:01:53Z 2022-06-22T16:01:53Z MEMBER

Thank you v much @headtr1ck !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add `Dataset.dtypes` property 1275993190
1163300193 https://github.com/pydata/xarray/issues/6646#issuecomment-1163300193 https://api.github.com/repos/pydata/xarray/issues/6646 IC_kwDOAMm_X85FVo1h max-sixty 5635139 2022-06-22T15:57:52Z 2022-06-22T15:57:52Z MEMBER

As discussed on the dev call — we can plan to move to dim, with the exception of constructors!

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `dim` vs `dims` 1250939008
1161952023 https://github.com/pydata/xarray/issues/6704#issuecomment-1161952023 https://api.github.com/repos/pydata/xarray/issues/6704 IC_kwDOAMm_X85FQfsX max-sixty 5635139 2022-06-21T15:59:22Z 2022-06-21T15:59:22Z MEMBER

I feel honored thanks! But given that I will become a father any day now, I don't think I will be able to join regularly...

Congrats on the forthcoming arrival!

Ofc, no stress if you can't make the meeting, and obv zero stress if you can't make lots of them.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Future of `DataArray.rename` 1275752720
1160665041 https://github.com/pydata/xarray/pull/6706#issuecomment-1160665041 https://api.github.com/repos/pydata/xarray/issues/6706 IC_kwDOAMm_X85FLlfR max-sixty 5635139 2022-06-20T16:53:12Z 2022-06-20T16:53:12Z MEMBER

Is it intentional that DataArrayCoordinates and DatasetCoordinates are not part of api?

Good question, I'm not sure. They are not intended to be created by users IIUC, it's more like a "view" of the underlying coords. Does anyone have a view?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add `Dataset.dtypes` property 1275993190

Next page

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

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]);
Powered by Datasette · Queries took 178.367ms · About: xarray-datasette