issue_comments
39 rows where issue = 387924616 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: reactions, created_at (date), updated_at (date)
issue 1
- CFTimeIndex Resampling · 39 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
460019486 | https://github.com/pydata/xarray/pull/2593#issuecomment-460019486 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ2MDAxOTQ4Ng== | shoyer 1217238 | 2019-02-03T03:21:29Z | 2019-02-03T03:21:29Z | MEMBER | thanks @jwenfai and @spencerkclark ! |
{ "total_count": 2, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 1, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
460009606 | https://github.com/pydata/xarray/pull/2593#issuecomment-460009606 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ2MDAwOTYwNg== | jwenfai 8708062 | 2019-02-02T23:48:09Z | 2019-02-02T23:48:09Z | CONTRIBUTOR | All tests passed. Thanks, @spencerkclark and @shoyer, for all the help! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
459998025 | https://github.com/pydata/xarray/pull/2593#issuecomment-459998025 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1OTk5ODAyNQ== | spencerkclark 6628425 | 2019-02-02T20:49:30Z | 2019-02-02T20:49:30Z | MEMBER | Sounds good @shoyer, thanks for bringing this to the finish line. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
459997853 | https://github.com/pydata/xarray/pull/2593#issuecomment-459997853 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1OTk5Nzg1Mw== | shoyer 1217238 | 2019-02-02T20:46:45Z | 2019-02-02T20:46:45Z | MEMBER | I'm going to merge this when tests pass |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
444627776 | https://github.com/pydata/xarray/pull/2593#issuecomment-444627776 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ0NDYyNzc3Ng== | pep8speaks 24736507 | 2018-12-05T20:08:13Z | 2019-02-02T20:46:26Z | NONE | Hello @jwenfai! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. :beers: Comment last updated on February 02, 2019 at 20:46 Hours UTC |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
459859650 | https://github.com/pydata/xarray/pull/2593#issuecomment-459859650 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1OTg1OTY1MA== | shoyer 1217238 | 2019-02-01T20:36:53Z | 2019-02-01T20:36:53Z | MEMBER | It looks like tests are passing now. I'm going to give this another look over and then (probably) merge |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
458608075 | https://github.com/pydata/xarray/pull/2593#issuecomment-458608075 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1ODYwODA3NQ== | fmaussion 10050469 | 2019-01-29T16:30:03Z | 2019-01-29T16:30:03Z | MEMBER |
Some connection error. I restarted Travis, let's see if this happens again. |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
457963032 | https://github.com/pydata/xarray/pull/2593#issuecomment-457963032 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1Nzk2MzAzMg== | jwenfai 8708062 | 2019-01-27T23:08:06Z | 2019-01-27T23:08:06Z | CONTRIBUTOR |
Fix works, all tests are passing now. Thanks! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
457954188 | https://github.com/pydata/xarray/pull/2593#issuecomment-457954188 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1Nzk1NDE4OA== | shoyer 1217238 | 2019-01-27T21:05:40Z | 2019-01-27T21:05:40Z | MEMBER | I just merged a fix for the test failures with pandas 0.24. If you merge in master that should fix your issues here too. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
456581862 | https://github.com/pydata/xarray/pull/2593#issuecomment-456581862 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NjU4MTg2Mg== | jwenfai 8708062 | 2019-01-22T22:07:24Z | 2019-01-22T22:07:24Z | CONTRIBUTOR | The pandas-dev build job is still failing but everything else is passing. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
456513616 | https://github.com/pydata/xarray/pull/2593#issuecomment-456513616 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NjUxMzYxNg== | spencerkclark 6628425 | 2019-01-22T18:39:37Z | 2019-01-22T18:39:37Z | MEMBER | One more optional thing -- support for the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
456176524 | https://github.com/pydata/xarray/pull/2593#issuecomment-456176524 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NjE3NjUyNA== | jwenfai 8708062 | 2019-01-21T19:22:38Z | 2019-01-21T19:22:38Z | CONTRIBUTOR | I made the changes. Did not preview the .rst files but they should render correctly. For the non-standard calendars, I can't think of any way to test them except to compare them against output from pandas. I think it's fine as long as the original and resampled indices do not go over 28 days. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455907774 | https://github.com/pydata/xarray/pull/2593#issuecomment-455907774 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTkwNzc3NA== | jwenfai 8708062 | 2019-01-20T22:17:51Z | 2019-01-20T22:17:51Z | CONTRIBUTOR | Thanks for showing me how the code could be improved @spencerkclark. I've pushed the changes. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455816654 | https://github.com/pydata/xarray/pull/2593#issuecomment-455816654 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTgxNjY1NA== | jwenfai 8708062 | 2019-01-19T21:28:10Z | 2019-01-19T21:28:10Z | CONTRIBUTOR | I've looked at the failed tests on
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455807650 | https://github.com/pydata/xarray/pull/2593#issuecomment-455807650 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTgwNzY1MA== | jwenfai 8708062 | 2019-01-19T19:20:28Z | 2019-01-19T19:20:28Z | CONTRIBUTOR | Just saw your comment. I've actually resolved the merge conflicts on my end and haven't pushed them yet. Checks for The Going to push my changes and see what CI says. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455790039 | https://github.com/pydata/xarray/pull/2593#issuecomment-455790039 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTc5MDAzOQ== | spencerkclark 6628425 | 2019-01-19T15:33:43Z | 2019-01-19T15:38:08Z | MEMBER |
That's great news!
Before spending too much time on that just yet, see if you can resolve the merge conflicts, and if you can think about a way to reduce the length of the existing tests. It would be helpful to see a coverage report generated by coveralls for the new logic you've added (if you resolve the merge conflicts our CI here will run and we'll be able to see that automatically). Maybe start by commenting out a bunch of the really long tests and see where things stand? Then we can think about how to add coverage back in as needed. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455788936 | https://github.com/pydata/xarray/pull/2593#issuecomment-455788936 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTc4ODkzNg== | jwenfai 8708062 | 2019-01-19T15:19:01Z | 2019-01-19T15:19:01Z | CONTRIBUTOR | Ignore my last comment, I made a really silly mistake. I assumed it was I think writing targeted unit tests are the last thing on the agenda, so I'll get right on that. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455734854 | https://github.com/pydata/xarray/pull/2593#issuecomment-455734854 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTczNDg1NA== | jwenfai 8708062 | 2019-01-19T01:11:59Z | 2019-01-19T01:12:08Z | CONTRIBUTOR | Thanks for raising the issue with the cftime devs. I've tested the function and it produces exact datetime values but there's still a problem with extra bins and nan location mismatch. I'll report back once I have a clearer idea of what's going on. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455662721 | https://github.com/pydata/xarray/pull/2593#issuecomment-455662721 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTY2MjcyMQ== | spencerkclark 6628425 | 2019-01-18T19:35:14Z | 2019-01-18T19:35:14Z | MEMBER | @jwenfai I created an issue in cftime regarding this question: Unidata/cftime#109. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455619034 | https://github.com/pydata/xarray/pull/2593#issuecomment-455619034 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTYxOTAzNA== | spencerkclark 6628425 | 2019-01-18T17:09:26Z | 2019-01-18T18:23:19Z | MEMBER |
Ah indeed; this makes sense now. Maybe we should bring this up in cftime to see what their recommendation might be? I could imagine writing a function like this that would correct for this imprecision when taking the difference between two dates: ```python from datetime import timedelta def exact_cftime_datetime_difference(a, b): """Exact computation of b - a""" seconds = b.replace(microsecond=0) - a.replace(microsecond=0) seconds = int(round(seconds.total_seconds())) microseconds = b.microsecond - a.microsecond return timedelta(seconds=seconds, microseconds=microseconds) ``` Here are a couple test cases: ```python import cftime from datetime import datetime Testing with cftime version 1.0.0 where datetime where I canreproduce precision issues.test_cases = [ [(2000, 1, 1, 0, 4, 0, 956321), (1892, 1, 3, 12, 0, 0, 112123)], [(2000, 1, 1, 0, 4, 0, 1), (1892, 1, 3, 12, 0, 0, 503432)], [(2000, 1, 1, 0, 4, 0, 999999), (1892, 1, 3, 12, 0, 0, 112123)], [(2000, 1, 1, 0, 4, 0, 11213), (1892, 1, 3, 12, 0, 0, 77777)], ] for a_args, b_args in test_cases: a_cftime = cftime.DatetimeGregorian(a_args) b_cftime = cftime.DatetimeGregorian(b_args) a = datetime(a_args) b = datetime(b_args)
``` But maybe I'm missing something important. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455584540 | https://github.com/pydata/xarray/pull/2593#issuecomment-455584540 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTU4NDU0MA== | jwenfai 8708062 | 2019-01-18T15:28:36Z | 2019-01-18T15:28:36Z | CONTRIBUTOR | Your impressions are correct, sorry if my earlier comments confused you. I was just guessing that imprecise The I'll provide examples of extra bins later in the day. For now, here's an example of the datetime imprecision in
which gave me
The extra 8 microseconds shouldn't be there. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455540080 | https://github.com/pydata/xarray/pull/2593#issuecomment-455540080 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTU0MDA4MA== | spencerkclark 6628425 | 2019-01-18T13:07:59Z | 2019-01-18T13:07:59Z | MEMBER | @jwenfai to provide some more detail for my confusion here -- my impression is that adding or subtracting a Taking the difference between two dates to produce a timedelta object takes a different code path in cftime, which is not microsecond-precise. This, as we've seen, can induce some small errors in interpolation (because in the process we need to determine the amount of time between each date in the time coordinate and a reference date).
Could you provide more details about this example? What were the resample parameters used (e.g. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455390725 | https://github.com/pydata/xarray/pull/2593#issuecomment-455390725 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTM5MDcyNQ== | spencerkclark 6628425 | 2019-01-18T01:09:59Z | 2019-01-18T01:34:59Z | MEMBER |
Exactly 👍
~~I think the "values falls before first bin" errors are all from pandas, where datetime arithmetic is exact, so they could not be due to cftime, right?~~ I'll take a look at the 6AS-JUN tests. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455393260 | https://github.com/pydata/xarray/pull/2593#issuecomment-455393260 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTM5MzI2MA== | spencerkclark 6628425 | 2019-01-18T01:23:20Z | 2019-01-18T01:23:20Z | MEMBER |
Oops, my bad, I should have read more carefully! I'll think about this more. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455392167 | https://github.com/pydata/xarray/pull/2593#issuecomment-455392167 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTM5MjE2Nw== | jwenfai 8708062 | 2019-01-18T01:17:38Z | 2019-01-18T01:17:38Z | CONTRIBUTOR |
Oh no, I meant that except for all the "values falls before first bin" errors, most (if not all) of the errors are due to shape mismatch between the resampled cftime and pandas arrays. Of the ones I've inspected, the resampled cftime array always has 1 more bin than pandas, e.g.:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455391923 | https://github.com/pydata/xarray/pull/2593#issuecomment-455391923 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTM5MTkyMw== | spencerkclark 6628425 | 2019-01-18T01:16:21Z | 2019-01-18T01:17:10Z | MEMBER |
Yeah this has for sure been helpful for development -- I did not expect to encounter the "values falls before first bin" error, but clearly it seems we do need to worry about it. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
455386887 | https://github.com/pydata/xarray/pull/2593#issuecomment-455386887 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NTM4Njg4Nw== | jwenfai 8708062 | 2019-01-18T00:50:29Z | 2019-01-18T00:50:29Z | CONTRIBUTOR |
Could this issue be related to the linear algebra library? A minimal example would be the earlier example you gave. For both cftime 1.0.0 and 1.0.3.4, I get "mismatch 60.0%".
So I keep pandas' logic (the first bin has 1 day and 1 microsecond added to it) and raise a Value Error when either
I'm testing against the dev version, 11 commits behind. Could the errors for
We probably don't. I forget the reason but early on in development, resampling tests failed for some time ranges when using purely odd frequencies while others failed with purely even ones. Resampling tests for12H/24H frequencies might not be needed now that `_adjust_bin_edges' is being used.
I'll look into writing targeted unit tests. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
454940009 | https://github.com/pydata/xarray/pull/2593#issuecomment-454940009 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1NDk0MDAwOQ== | jwenfai 8708062 | 2019-01-16T21:02:18Z | 2019-01-16T21:02:18Z | CONTRIBUTOR | Hi @spencerkclark, sorry it took so long to get back to you. I've implemented your simplified resampling logic. Some of the logic had to be altered since pandas have made updates. It's great not having to delineate between upsampling/downsampling cases! I ran into some issues though and I thought maybe an extra pair of eyes could help me diagnose them:
CFTimeIndex resampling does not encounter the same error. Nevertheless, I've changed the CFTimeIndex resampling logic so that the first bin value does not have 1 day minus 1 microsecond added to it to (hopefully) rectify the error. Testing against pandas resampling results does not show any difference between the corrected and uncorrected CFTimeIndex resampling code.
Since I've rewritten |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
450740815 | https://github.com/pydata/xarray/pull/2593#issuecomment-450740815 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1MDc0MDgxNQ== | spencerkclark 6628425 | 2019-01-01T16:18:40Z | 2019-01-01T16:18:40Z | MEMBER |
No worries! I just wanted to get these thoughts down when I had some time. No rush to make any updates. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
450544589 | https://github.com/pydata/xarray/pull/2593#issuecomment-450544589 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1MDU0NDU4OQ== | jwenfai 8708062 | 2018-12-30T07:45:24Z | 2018-12-30T07:45:24Z | CONTRIBUTOR | I'm on a break right now and I'll look more closely at the alternative solution when I'm back, but from what I've read in your comment the solution makes sense. Also, nice job catching why |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
450533035 | https://github.com/pydata/xarray/pull/2593#issuecomment-450533035 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ1MDUzMzAzNQ== | spencerkclark 6628425 | 2018-12-30T01:31:12Z | 2018-12-30T01:31:12Z | MEMBER | So the crux of the problem now seems to be in generating For data indexed by a CFTimeIndex, we do not have the luxury of a formal I've put together a gist which compares the This inspired the alternative solution proposed in the second part of the gist (I've also added back in a call to a cftime version of the Let me know if this alternative solution makes sense. Digging in to the guts of the resample code in pandas/xarray is still fairly new for me too, so I could be missing something. In the gist I'm using this branch of xarray, the development version of pandas, and the latest version of cftime. Thanks again for your hard work on this! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
449635856 | https://github.com/pydata/xarray/pull/2593#issuecomment-449635856 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ0OTYzNTg1Ng== | spencerkclark 6628425 | 2018-12-23T13:16:41Z | 2018-12-23T13:16:41Z | MEMBER |
I think it is OK to continue working here, with the aim of implementing resample for cftime that is closest to the most up-to-date pandas version. We can add code to skip tests that depend on this behavior if the version of pandas is not recent enough (see an example of doing this here). As we're working before version 0.24 of pandas is released we can keep an eye on our "py36-pandas-dev" CI build listed under the "Allowed Failures" section in Travis. |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
449555459 | https://github.com/pydata/xarray/pull/2593#issuecomment-449555459 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ0OTU1NTQ1OQ== | jwenfai 8708062 | 2018-12-22T08:39:59Z | 2018-12-22T08:39:59Z | CONTRIBUTOR | Glad to see that I'm not the only one getting different results. And I agree (biased as I am) that the additional bin at the end of resampled time series is superfluous. If pandas master with the altered resampling logic will be the definitive version going forward, should development of CFTimeIndex resampling be suspended until this version of pandas master is released and xarray uses it as a dependency? On a somewhat related note, looking over the latest pandas master resample.py made me realize that
https://github.com/pydata/xarray/blob/4317c697900c80604dee793ffc1186e5c57a03fd/xarray/core/resample_cftime.py#L114-L118
is now wrong due to changes made 16 days ago (https://github.com/pandas-dev/pandas/issues/24127) . Since non-integer offset frequencies are not supported by BaseCFTimeOffset, ( |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
449534277 | https://github.com/pydata/xarray/pull/2593#issuecomment-449534277 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ0OTUzNDI3Nw== | spencerkclark 6628425 | 2018-12-22T01:19:42Z | 2018-12-22T01:19:42Z | MEMBER | So I think the way you have things written now in |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
449533135 | https://github.com/pydata/xarray/pull/2593#issuecomment-449533135 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ0OTUzMzEzNQ== | spencerkclark 6628425 | 2018-12-22T01:04:32Z | 2018-12-22T01:04:32Z | MEMBER | Yes, I noticed this too. I think it's related to changes made here: https://github.com/pandas-dev/pandas/pull/24347. At least in the test cases that I've run, I've only seen it make a difference in the NaN placement at the end of the time series. For example with pandas 0.23.4: ``` In [1]: import xarray as xr; import pandas as pd In [2]: nptimes = pd.date_range('2000', periods=2000) In [3]: nptime_da = xr.DataArray(range(2000), [('time', nptimes)]) In [4]: nptime_da.resample(time='4AS').mean('time')
Out[4]:
<xarray.DataArray (time: 3)>
array([ 730., 1730., nan])
Coordinates:
* time (time) datetime64[ns] 2000-01-01 2004-01-01 2008-01-01
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
449529506 | https://github.com/pydata/xarray/pull/2593#issuecomment-449529506 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ0OTUyOTUwNg== | jwenfai 8708062 | 2018-12-22T00:23:34Z | 2018-12-22T00:23:34Z | CONTRIBUTOR | Can anyone confirm that the latest unreleased build of pandas gives resample results that are different from pandas 0.23.4? I get results that match cftime resampling for downsampling and upsampling without having to rely on |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
448448286 | https://github.com/pydata/xarray/pull/2593#issuecomment-448448286 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ0ODQ0ODI4Ng== | jwenfai 8708062 | 2018-12-19T02:36:38Z | 2018-12-19T02:36:38Z | CONTRIBUTOR | @spencerkclark Sorry about that, must be a couple of commits behind. Should be resolved now. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
448443826 | https://github.com/pydata/xarray/pull/2593#issuecomment-448443826 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ0ODQ0MzgyNg== | spencerkclark 6628425 | 2018-12-19T02:11:03Z | 2018-12-19T02:11:03Z | MEMBER | @jwenfai thanks for the updates. It looks like there are some merge conflicts that are preventing our CI from running. Could you please resolve those when you get chance, so we can see those results? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 | |
447718468 | https://github.com/pydata/xarray/pull/2593#issuecomment-447718468 | https://api.github.com/repos/pydata/xarray/issues/2593 | MDEyOklzc3VlQ29tbWVudDQ0NzcxODQ2OA== | jwenfai 8708062 | 2018-12-17T04:20:51Z | 2018-12-17T04:20:51Z | CONTRIBUTOR | @spencerkclark Thanks for the detailed review! I'll fix up my code over the next few days. I haven't completely solved the upsampling issue yet but I think I might have some clues as to what's happening. Timedelta operations on cftime.datetime does not always return correct values. Sometimes, they are a few microseconds or one second off. The issue can be sidestepped by shifting the the bins 1 second forward for |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex Resampling 387924616 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [performed_via_github_app] TEXT, [issue] INTEGER REFERENCES [issues]([id]) ); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user 5