id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 369695807,MDU6SXNzdWUzNjk2OTU4MDc=,2483,'module' object has no attribute 'AxisError',41115380,closed,0,,,5,2018-10-12T20:15:38Z,2018-10-13T18:41:07Z,2018-10-13T18:41:07Z,NONE,,,,"Just upgraded all of my packages through `conda update --all` and then got this error when importing xarray: ```python Traceback (most recent call last): File ""/var/spool/torque/mom_priv/jobs/63530.rdf-xcat.SC"", line 11, in import xarray as xr File ""/nerc/n02/n02/amethyst/.conda/envs/my_root/lib/python3.4/site-packages/xarray/__init__.py"", line 10, in from .core.alignment import align, broadcast, broadcast_arrays File ""/nerc/n02/n02/amethyst/.conda/envs/my_root/lib/python3.4/site-packages/xarray/core/alignment.py"", line 11, in from .indexing import get_indexer_nd File ""/nerc/n02/n02/amethyst/.conda/envs/my_root/lib/python3.4/site-packages/xarray/core/indexing.py"", line 11, in from . import duck_array_ops, nputils, utils File ""/nerc/n02/n02/amethyst/.conda/envs/my_root/lib/python3.4/site-packages/xarray/core/duck_array_ops.py"", line 22, in from . import dask_array_compat File ""/nerc/n02/n02/amethyst/.conda/envs/my_root/lib/python3.4/site-packages/xarray/core/dask_array_compat.py"", line 47, in AxisError = np.AxisError AttributeError: 'module' object has no attribute 'AxisError' ``` May be relevant, when I do `conda list`, I get two versions of xarray: ``` xarray 0.10.9 xarray 0.8.2 py34_0 ```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2483/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 365438396,MDU6SXNzdWUzNjU0MzgzOTY=,2450,da.loc[date[0]] brings up two instead of one,41115380,closed,0,,,17,2018-10-01T12:29:31Z,2018-10-02T20:38:38Z,2018-10-02T20:38:37Z,NONE,,,,"#### Problem description My dataset has lots of days, with data for two times for each day: midnight and midday (12am and 12pm). With date[0], I am trying to retrieve only the midnight data from the first day; with date[1], the midday data from the same day; date[3] the midnight data from the next day, etc. Now I'm writing this, I'm not sure I've posted this in the right place so please let me know if I haven't. #### Code Sample 1: this gives data for midnight and midday (time: 2) ```python from datetime import datetime, timedelta start = datetime(1979, 1, 1) date = [start.strftime('%Y%m%d')] a = first_dataset.loc[date[0]] print(a) array([[[ #there are numbers here, cut out for ease of reading ]]]) Coordinates: * longitude (longitude) float32 0.0 0.75 1.5 2.25 3.0 3.75 4.5 5.25 6.0 ... * latitude (latitude) float32 90.0 89.25 88.5 87.75 87.0 86.25 85.5 ... * time (time) datetime64[ns] 1979-01-01 1979-01-01 T12:00:00 #as you can see here, for #midnight the time is just 1979-01-01 instead of 1979-01-01 00:00:00, which I think might be causing #some confusion in my code ``` #### Code Sample 2: try adding hour to the date ```python from datetime import datetime, timedelta start = datetime(1979, 1, 1) date = [start.strftime('%Y%m%d%H')] #this what I changed a = first_dataset.loc[date[0]] print(a) Traceback (most recent call last): File ""pandas/index.pyx"", line 589, in pandas.index.DatetimeEngine.get_loc (pandas/index.c:11661) File ""pandas/src/hashtable_class_helper.pxi"", line 404, in pandas.hashtable.Int64HashTable.get_item (pandas/hashtable.c:8543) TypeError: an integer is required During handling of the above exception, another exception occurred: Traceback (most recent call last): File ""/nerc/n02/n02/amethyst/.conda/envs/my_root/lib/python3.4/site-packages/pandas/indexes/base.py"", line 2134, in get_loc return self._engine.get_loc(key) File ""pandas/index.pyx"", line 553, in pandas.index.DatetimeEngine.get_loc (pandas/index.c:11829) File ""pandas/index.pyx"", line 591, in pandas.index.DatetimeEngine.get_loc (pandas/index.c:11735) File ""pandas/index.pyx"", line 597, in pandas.index.DatetimeEngine._date_check_type (pandas/index.c:11899) KeyError: '1979010100' ``` #### Expected Output ```python a = first_dataset.loc[date[0]] print(a) array([[[ #there are numbers here, cut out for ease of reading ]]]) Coordinates: * longitude (longitude) float32 0.0 0.75 1.5 2.25 3.0 3.75 4.5 5.25 6.0 ... * latitude (latitude) float32 90.0 89.25 88.5 87.75 87.0 86.25 85.5 ... * time (time) datetime64[ns] 1979-01-01 ```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2450/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 344019665,MDU6SXNzdWUzNDQwMTk2NjU=,2307,Pick a certain time ,41115380,closed,0,,,2,2018-07-24T12:41:18Z,2018-07-24T13:38:56Z,2018-07-24T13:38:56Z,NONE,,,,"I have a variable with time, lon and lat dimensions. I can specify longitude (`uu = u.where(u.longitude >= 30)`), similarly with latitude, but I'm struggling to specify a certain date/time. Printing the time gives the following output: ``` >>> print u.time array(['2018-04-01T00:00:00.000000000', '2018-04-01T06:00:00.000000000', '2018-04-01T12:00:00.000000000', '2018-04-01T18:00:00.000000000', '2018-04-02T00:00:00.000000000', '2018-04-02T06:00:00.000000000', '2018-04-02T12:00:00.000000000', '2018-04-02T18:00:00.000000000'], dtype='datetime64[ns]') Coordinates: * time (time) datetime64[ns] 2018-04-01 2018-04-01T06:00:00 ... Attributes: long_name: time ``` I've tried naming the date by a number like `uu = u.where(u.time >= 4)` but it gives `TypeError: invalid type promotion`, and it's not very useful when using a dataset with a huge time dimension. I'd just like some help figuring out the syntax for specifying days/times. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2307/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue