home / github / pull_requests

Menu
  • GraphQL API
  • Search all tables

pull_requests: 538503497

This data as json

id node_id number state locked title user body created_at updated_at closed_at merged_at merge_commit_sha assignee milestone draft head base author_association auto_merge repo url merged_by
538503497 MDExOlB1bGxSZXF1ZXN0NTM4NTAzNDk3 4684 closed 0 Ensure maximum accuracy when encoding and decoding np.datetime64[ns] values 6628425 <!-- Feel free to remove check-list items aren't relevant to your change --> - [x] Closes #4045 - [x] Tests added - [x] Passes `isort . && black . && mypy . && flake8` - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` This PR cleans up the logic used to encode and decode times with pandas so that by default we use `int64` values in both directions for all precisions down to nanosecond. If a user specifies an encoding (or a file is read in) such that `float` values would be required, things still work as they did before. I do this mainly by following the approach I described here: https://github.com/pydata/xarray/issues/4045#issuecomment-626257580. In the process of doing this I made a few changes to `coding.times._decode_datetime_with_pandas`: - I removed the checks on the minimum and maximum dates to decode, as the issue those checks were imposed for (#975) was fixed in pandas way back in 2016 (https://github.com/pandas-dev/pandas/issues/14068). - I used an alternate approach for fixing #2002, which allows us to continue to use the optimization made in #1414 without having to cast the input array to a `float` dtype first. Note this will change the default units that are chosen for encoding times in some instances -- previously we would never default to anything more precise than seconds -- but I think this change is for the better. cc: @aldanor @hmaarrfk this overlaps a little with your work in #4400, so I'm giving you credit here too (I hope you don't mind!). 2020-12-12T21:43:57Z 2021-02-07T23:30:41Z 2021-01-03T23:39:04Z 2021-01-03T23:39:04Z ed255736664f8f0b4ea199c8f91bffaa89522d03     0 2775a609edcc356cf0f5744e7c449e5aa1bd343c 0f1eb96c924bad60ea87edd9139325adabfefa33 MEMBER   13221727 https://github.com/pydata/xarray/pull/4684  

Links from other tables

  • 0 rows from pull_requests_id in labels_pull_requests
Powered by Datasette · Queries took 0.642ms