home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

20 rows where issue = 936313924 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 6

  • Illviljan 7
  • TomNicholas 7
  • dcherian 3
  • max-sixty 1
  • pep8speaks 1
  • github-actions[bot] 1

author_association 3

  • MEMBER 18
  • CONTRIBUTOR 1
  • NONE 1

issue 1

  • Rely on NEP-18 to dispatch to dask in duck_array_ops · 20 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
873461305 https://github.com/pydata/xarray/pull/5571#issuecomment-873461305 https://api.github.com/repos/pydata/xarray/issues/5571 MDEyOklzc3VlQ29tbWVudDg3MzQ2MTMwNQ== github-actions[bot] 41898282 2021-07-03T19:50:27Z 2021-09-30T22:13:25Z CONTRIBUTOR

Unit Test Results

6 files  ±0           6 suites  ±0   56m 27s :stopwatch: ±0s 16 228 tests ±0  14 493 :heavy_check_mark: ±0  1 735 :zzz: ±0  0 :x: ±0  90 564 runs  ±0  82 384 :heavy_check_mark: ±0  8 180 :zzz: ±0  0 :x: ±0 

Results for commit ebfc6a3d. ± Comparison against base commit ebfc6a3d.

:recycle: This comment has been updated with latest results.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
931724589 https://github.com/pydata/xarray/pull/5571#issuecomment-931724589 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X843iP0t TomNicholas 35968931 2021-09-30T21:39:32Z 2021-09-30T21:39:32Z MEMBER

The what's new entry for this went in under the wrong edition - I fixed it in https://github.com/pydata/xarray/commit/ebfc6a3db0580cc11418e906766805ff4bf36455

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
930405466 https://github.com/pydata/xarray/pull/5571#issuecomment-930405466 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X843dNxa TomNicholas 35968931 2021-09-29T17:48:31Z 2021-09-29T17:48:31Z MEMBER

Thanks for the reminder @dcherian - I merged main and all the tests pass so I'll merge this PR now!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
873458374 https://github.com/pydata/xarray/pull/5571#issuecomment-873458374 https://api.github.com/repos/pydata/xarray/issues/5571 MDEyOklzc3VlQ29tbWVudDg3MzQ1ODM3NA== pep8speaks 24736507 2021-07-03T19:24:40Z 2021-09-29T17:13:58Z NONE

Hello @TomNicholas! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2021-09-29 17:13:58 UTC
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
907489614 https://github.com/pydata/xarray/pull/5571#issuecomment-907489614 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X842FzFO TomNicholas 35968931 2021-08-27T21:36:48Z 2021-08-27T21:36:48Z MEMBER

Doctests passed! Thanks so much @Illviljan !

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
907414746 https://github.com/pydata/xarray/pull/5571#issuecomment-907414746 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X842Fgza Illviljan 14371165 2021-08-27T19:08:38Z 2021-08-27T19:15:38Z MEMBER

I don't understand why doctests doesn't go through the if path, is it using tricks that can make around.__doc__ == None?

Anyway I think just ignoring these typing errors might be easier.

Readthedocs error: ```


/home/docs/checkouts/readthedocs.org/user_builds/xray/checkouts/5571/xarray/core/_typed_ops.py:docstring of xarray.core._typed_ops.DataArrayOpsMixin.round:65: WARNING: Explicit markup ends without a blank line; unexpected unindent. /home/docs/checkouts/readthedocs.org/user_builds/xray/checkouts/5571/xarray/core/_typed_ops.py:docstring of xarray.core._typed_ops.DataArrayOpsMixin.round:65: WARNING: Unexpected section title or transition. ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
907395913 https://github.com/pydata/xarray/pull/5571#issuecomment-907395913 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X842FcNJ Illviljan 14371165 2021-08-27T18:34:42Z 2021-08-27T18:34:42Z MEMBER

I must say it gets kind of annoying having so pedantic doctests and doc generation when upstream modules aren't as picky.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
907366817 https://github.com/pydata/xarray/pull/5571#issuecomment-907366817 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X842FVGh dcherian 2448579 2021-08-27T17:42:32Z 2021-08-27T17:42:32Z MEMBER

Thanks @Illviljan

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
906634816 https://github.com/pydata/xarray/pull/5571#issuecomment-906634816 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X842CiZA Illviljan 14371165 2021-08-26T18:16:51Z 2021-08-27T16:56:35Z MEMBER

Seems to be a problem in numpy np.around fails the doctest, see https://github.com/numpy/numpy/issues/19759.

I wonder if the docstring can be ignored if it is copied from somewhere else?

I think an easy workaround is simply replacing the docstring: https://github.com/pydata/xarray/blob/4fd81b51101aceaad08570f1368ad4b50a946da5/xarray/core/duck_array_ops.py#L75

```python around = _dask_or_eager_func("around") # np.around has failing doctests, overwrite it so they pass: around.__doc__ = """ Evenly round to the given number of decimals. Parameters ---------- a : array_like Input data. decimals : int, optional Number of decimal places to round to (default: 0). If decimals is negative, it specifies the number of positions to the left of the decimal point. out : ndarray, optional Alternative output array in which to place the result. It must have the same shape as the expected output, but the type of the output values will be cast if necessary. See :ref:`ufuncs-output-type` for more details. Returns ------- rounded_array : ndarray An array of the same type as `a`, containing the rounded values. Unless `out` was specified, a new array is created. A reference to the result is returned. The real and imaginary parts of complex numbers are rounded separately. The result of rounding a float is a float. See Also -------- ndarray.round : equivalent method ceil, fix, floor, rint, trunc Notes ----- For values exactly halfway between rounded decimal values, NumPy rounds to the nearest even value. Thus 1.5 and 2.5 round to 2.0, -0.5 and 0.5 round to 0.0, etc. ``np.around`` uses a fast but sometimes inexact algorithm to round floating-point datatypes. For positive `decimals` it is equivalent to ``np.true_divide(np.rint(a * 10**decimals), 10**decimals)``, which has error due to the inexact representation of decimal fractions in the IEEE floating point standard [1]_ and errors introduced when scaling by powers of ten. For instance, note the extra "1" in the following: >>> np.round(56294995342131.5, 3) 56294995342131.51 If your goal is to print such values with a fixed number of decimals, it is preferable to use numpy's float printing routines to limit the number of printed decimals: >>> np.format_float_positional(56294995342131.5, precision=3) '56294995342131.5' The float printing routines use an accurate but much more computationally demanding algorithm to compute the number of digits after the decimal point. Alternatively, Python's builtin `round` function uses a more accurate but slower algorithm for 64-bit floating point values: >>> round(56294995342131.5, 3) 56294995342131.5 >>> np.round(16.055, 2), round(16.055, 2) # equals 16.0549999999999997 (16.06, 16.05) References ---------- .. [1] "Lecture Notes on the Status of IEEE 754", William Kahan, https://people.eecs.berkeley.edu/~wkahan/ieee754status/IEEE754.PDF .. [2] "How Futile are Mindless Assessments of Roundoff in Floating-Point Computation?", William Kahan, https://people.eecs.berkeley.edu/~wkahan/Mindless.pdf Examples -------- >>> np.around([0.37, 1.64]) array([0., 2.]) >>> np.around([0.37, 1.64], decimals=1) array([0.4, 1.6]) >>> np.around([.5, 1.5, 2.5, 3.5, 4.5]) # rounds to nearest even value array([0., 2., 2., 4., 4.]) >>> np.around([1,2,3,11], decimals=1) # ndarray of ints is returned array([ 1, 2, 3, 11]) >>> np.around([1,2,3,11], decimals=-1) array([ 0, 0, 0, 10]) """ ```
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
907340223 https://github.com/pydata/xarray/pull/5571#issuecomment-907340223 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X842FOm_ Illviljan 14371165 2021-08-27T16:55:12Z 2021-08-27T16:55:12Z MEMBER

Saw dask does similar fixes too: https://github.com/dask/dask/blob/85f0b14bd36a5135ce51aeee067b6207374b00c4/dask/array/wrap.py#L183

Here's a version inspired by that one: ```python around = _dask_or_eager_func("around")

np.around has failing doctests, overwrite it so they pass:

https://github.com/numpy/numpy/issues/19759

around.doc = test.doc.replace( "array([0., 2.])", "array([0., 2.])", ) around.doc = test.doc.replace( "array([0.4, 1.6])", "array([0.4, 1.6])", ) around.doc = test.doc.replace( "array([0., 2., 2., 4., 4.])", "array([0., 2., 2., 4., 4.])", ) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
906092175 https://github.com/pydata/xarray/pull/5571#issuecomment-906092175 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X842Ad6P Illviljan 14371165 2021-08-26T04:50:04Z 2021-08-26T04:50:04Z MEMBER

```python __ [doctest] xarray.core.typed_ops.DataArrayOpsMixin.round ___ EXAMPLE LOCATION UNKNOWN, not showing all tests of that example ??? >>> np.around([0.37, 1.64]) Expected: array([0., 2.]) Got: array([0., 2.])

/home/runner/work/xarray/xarray/xarray/core/_typed_ops.py:None: DocTestFailure ``` The expected had 2 spaces after the comma for some reason. I think the actual output makes more sense now so I think it's fine to just accept this difference and change the expected output.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
905980816 https://github.com/pydata/xarray/pull/5571#issuecomment-905980816 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X842ACuQ dcherian 2448579 2021-08-26T01:07:39Z 2021-08-26T01:07:39Z MEMBER

I think you just need to fix the spaces in the expected output

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
905973029 https://github.com/pydata/xarray/pull/5571#issuecomment-905973029 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X842AA0l TomNicholas 35968931 2021-08-26T00:46:35Z 2021-08-26T00:46:35Z MEMBER

@Illviljan that actually solved those padding errors! Awesome!

The tests still fail because of something going on with np.around in the doctests though :confused:

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
905947313 https://github.com/pydata/xarray/pull/5571#issuecomment-905947313 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X841_6ix Illviljan 14371165 2021-08-25T23:42:08Z 2021-08-25T23:42:08Z MEMBER

@TomNicholas try merging main now. Let's see if there are any errors left.

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 1
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
903140359 https://github.com/pydata/xarray/pull/5571#issuecomment-903140359 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X8411NQH Illviljan 14371165 2021-08-21T16:23:26Z 2021-08-21T16:23:26Z MEMBER

The issue mentioned in dask_array_compat.pad was closed around may 2020 (https://github.com/dask/dask/pull/6213). The min version of dask can be bumped to 2.24 tomorrow (from 2.15 and 2.9), maybe that's enough to fix the errors?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
885931906 https://github.com/pydata/xarray/pull/5571#issuecomment-885931906 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X840zj-C dcherian 2448579 2021-07-23T21:51:46Z 2021-07-23T21:52:51Z MEMBER

for padding fail with output that is 0.5 away from what's expected

We work around some dask bugs with dask_array_compat.pad I think you'll need to revert to that and not use np.pad until we can bump dask.

EDIT: though I don't see this kind of thing being fixed there.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
885213103 https://github.com/pydata/xarray/pull/5571#issuecomment-885213103 https://api.github.com/repos/pydata/xarray/issues/5571 IC_kwDOAMm_X840w0ev TomNicholas 35968931 2021-07-22T20:31:35Z 2021-07-22T20:31:35Z MEMBER

Now there is one more mystery: why do some of the tests for padding fail with output that is 0.5 away from what's expected??:

``` ___ TestVariableWithDask.test_pad[xr_arg3-np_arg3-mean] ______ [gw3] linux -- Python 3.7.10 /usr/share/miniconda/envs/xarray-tests/bin/python

self = <xarray.tests.test_variable.TestVariableWithDask object at 0x7f10bd848990> mode = 'mean', xr_arg = {'x': (3, 1), 'z': (2, 0)} np_arg = ((3, 1), (0, 0), (2, 0))

@pytest.mark.parametrize(
    "mode",
    [
        "mean",
        pytest.param(
            "median",
            marks=pytest.mark.xfail(reason="median is not implemented by Dask"),
        ),
        pytest.param(
            "reflect", marks=pytest.mark.xfail(reason="dask.array.pad bug")
        ),
        "edge",
        pytest.param(
            "linear_ramp",
            marks=pytest.mark.xfail(
                reason="pint bug: https://github.com/hgrecco/pint/issues/1026"
            ),
        ),
        "maximum",
        "minimum",
        "symmetric",
        "wrap",
    ],
)
@pytest.mark.parametrize("xr_arg, np_arg", _PAD_XR_NP_ARGS)
@pytest.mark.filterwarnings(
    r"ignore:dask.array.pad.+? converts integers to floats."
)
def test_pad(self, mode, xr_arg, np_arg):
    data = np.arange(4 * 3 * 2).reshape(4, 3, 2)
    v = self.cls(["x", "y", "z"], data)

    actual = v.pad(mode=mode, **xr_arg)
    expected = np.pad(data, np_arg, mode=mode)
  assert_array_equal(actual, expected)

E AssertionError: E Arrays are not equal E
E Mismatched elements: 48 / 96 (50%) E Max absolute difference: 0.5 E Max relative difference: 0.25 E x: array([[[ 9.5, 9.5, 9. , 10. ], E [11.5, 11.5, 11. , 12. ], E [13.5, 13.5, 13. , 14. ]],... E y: array([[[10, 10, 9, 10], E [12, 12, 11, 12], E [14, 14, 13, 14]],... ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
873471008 https://github.com/pydata/xarray/pull/5571#issuecomment-873471008 https://api.github.com/repos/pydata/xarray/issues/5571 MDEyOklzc3VlQ29tbWVudDg3MzQ3MTAwOA== max-sixty 5635139 2021-07-03T21:11:46Z 2021-07-03T21:11:46Z MEMBER

Looks great! I don't know the details of this code well, but at the conceptual level it looks good!

A net-negative pull request 🤯

The best type!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
873468285 https://github.com/pydata/xarray/pull/5571#issuecomment-873468285 https://api.github.com/repos/pydata/xarray/issues/5571 MDEyOklzc3VlQ29tbWVudDg3MzQ2ODI4NQ== TomNicholas 35968931 2021-07-03T20:49:50Z 2021-07-03T20:49:50Z MEMBER

A net-negative pull request :exploding_head:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924
873459181 https://github.com/pydata/xarray/pull/5571#issuecomment-873459181 https://api.github.com/repos/pydata/xarray/issues/5571 MDEyOklzc3VlQ29tbWVudDg3MzQ1OTE4MQ== TomNicholas 35968931 2021-07-03T19:31:44Z 2021-07-03T19:31:44Z MEMBER

Right I understand the failure now - everywhere where _dask_or_eager_func was dispatching numpy->dask is working fine via NEP-18, but my change made pandas.isnull no longer dispatch to dask.isnull, which then computes (and raises because we want it to be lazy). The solution is to special-case that one use of pandas (and perhaps any other uses of pandas?).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Rely on NEP-18 to dispatch to dask in duck_array_ops 936313924

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 257.149ms · About: xarray-datasette