Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only copy datetime64 data if it is using non-nanosecond precision. #125

Closed
wants to merge 17 commits into from

Commits on May 16, 2014

  1. convert array of netCDF4.datetime objects to numpy.datetime64 array t…

    …o support virtual_variable indexing, pydata#121
    Joe Hamman authored and Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    b303744 View commit details
    Browse the repository at this point in the history
  2. restrict the conversion of netCDF4.datetime objects to numpy.datetime…

    …64 object to valid years (1677<time<2262)
    Joe Hamman authored and Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    9dfe284 View commit details
    Browse the repository at this point in the history
  3. Handle arbitrary shape time arrays in nctime_to_nptime. Also added th…

    …e ability to fallback to netCDF4.datetime objects since this solution does not fix the problem for all calendars in all situations.
    Joe Hamman authored and Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    edcc854 View commit details
    Browse the repository at this point in the history
  4. initial implementation of support for NetCDF groups

    alimanfoo authored and Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    0d6a745 View commit details
    Browse the repository at this point in the history
  5. cleanup fallback code a bit

    Joe Hamman authored and Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    e41048c View commit details
    Browse the repository at this point in the history
  6. use IOError; safer recursion; don't worry about group cycles

    alimanfoo authored and Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    c406d2b View commit details
    Browse the repository at this point in the history
  7. Require only numpy 1.7 for the benefit of readthedocs

    ReadTheDocs comes with pre-built packages for the basic scientific python
    stack, but some of these packages are old (e.g., numpy is 1.7.1). The only way
    to upgrade packages on readthedocs is to use a virtual environment and a
    requirements.txt.
    
    Unfortunately, this means we can't upgrade both numpy and pandas
    simultaneously, because pandas may get built first and link against the wrong
    version of numpy. We inadvertantly stumbled upon a work around to build the
    "latest" docs by first installing numpy in the (cached) virtual environment,
    and then later (in another commit), adding pandas to the requirements.txt
    file.
    
    However, this is a real hack and makes it impossible to maintain different
    versions of the docs, such as for tagged releases. Accordingly, this commit
    relaxes the numpy version requirement so we can use a version that readthedocs
    already has installed. (We actually don't really need a newer version of numpy
    for any current functionality in xray, although it's nice to have for support
    for missing value functions like nanmean.)
    shoyer authored and Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    ec778a7 View commit details
    Browse the repository at this point in the history
  8. simplify group access to avoid recursion; test missing group error

    alimanfoo authored and Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    1c6b032 View commit details
    Browse the repository at this point in the history
  9. Add further testing for single element time ordinals.

    Expanded warnings for when non numpy.datetime64 arrays are returned.
    Use context manager for warnings in test_conventions.py.
    Joe Hamman authored and Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    8d95d38 View commit details
    Browse the repository at this point in the history
  10. filter warnings from earlier tests

    Joe Hamman authored and Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    e25cfcd View commit details
    Browse the repository at this point in the history
  11. correct filter message for warnings

    Joe Hamman authored and Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    a3f21d3 View commit details
    Browse the repository at this point in the history
  12. add test to catch fallback warnings, insure returning a numpy array d…

    …uring fallback of single element
    Joe Hamman authored and Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    69a9aa7 View commit details
    Browse the repository at this point in the history
  13. fix python 3 build; right way to test exception is raised

    alimanfoo authored and Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    3dd0d69 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3e870e2 View commit details
    Browse the repository at this point in the history
  15. Convert datetime objects to datetime64 upon variable creation in

    an attempt to standardize time handling.
    
    NOTE: virtual variable slicing is now broken, so do not submit.
    Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    d88e54f View commit details
    Browse the repository at this point in the history
  16. Added utils.safe_timestamp() which avoids issues when datetime[ns]

    variables get cast to integers.
    Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    6bf4cc3 View commit details
    Browse the repository at this point in the history
  17. Updated test_variable to deal with python 3 unicode types

    Alex Kleeman committed May 16, 2014
    Configuration menu
    Copy the full SHA
    d09708a View commit details
    Browse the repository at this point in the history