File tree 5 files changed +21
-19
lines changed
5 files changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ matrix:
32
32
- libnetcdf-dev
33
33
env : UPDATE_ENV="conda install cython && pip install https://github.com/Unidata/netcdf4-python/archive/master.zip"
34
34
- python : 2.7
35
- env : UPDATE_ENV="pip install toolz https://github.com/ContinuumIO/dask/archive/master.zip"
35
+ env : UPDATE_ENV="pip install toolz https://github.com/blaze/dask/archive/master.zip"
36
+ - python : 2.7
37
+ env : UPDATE_ENV="conda remove pandas && conda install cython && pip install https://github.com/pydata/pandas/archive/master.zip"
36
38
allow_failures :
37
39
- python : 2.7
38
40
env : UPDATE_ENV="pip install pydap"
@@ -44,7 +46,9 @@ matrix:
44
46
- libnetcdf-dev
45
47
env : UPDATE_ENV="conda install cython && pip install https://github.com/Unidata/netcdf4-python/archive/master.zip"
46
48
- python : 2.7
47
- env : UPDATE_ENV="pip install toolz https://github.com/ContinuumIO/dask/archive/master.zip"
49
+ env : UPDATE_ENV="pip install toolz https://github.com/blaze/dask/archive/master.zip"
50
+ - python : 2.7
51
+ env : UPDATE_ENV="conda remove pandas && conda install cython && pip install https://github.com/pydata/pandas/archive/master.zip"
48
52
49
53
before_install :
50
54
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ Enhancements
32
32
Bug fixes
33
33
~~~~~~~~~
34
34
35
+ - Forwards compatibility with the next release of changes (v0.17.0).
36
+ We were using some internal pandas routines for datetime conversion, which
37
+ unfortunately have now changed upstream (:issue: `569 `).
35
38
- Aggregation functions now correctly skip ``NaN `` for data for ``complex128 ``
36
39
dtype (:issue: `554 `).
37
40
- Fixed indexing 0d arrays with unicode dtype (:issue: `568 `).
Original file line number Diff line number Diff line change @@ -418,13 +418,6 @@ def _maybe_promote(dtype):
418
418
419
419
def _possibly_convert_objects (values ):
420
420
"""Convert arrays of datetime.datetime and datetime.timedelta objects into
421
- datetime64 and timedelta64
421
+ datetime64 and timedelta64, according to the pandas convention.
422
422
"""
423
- try :
424
- converter = functools .partial (pd .core .common ._possibly_convert_objects ,
425
- convert_numeric = False )
426
- except AttributeError :
427
- # our fault for using a private pandas API that has gone missing
428
- # this should do the same coercion (though it will be slower)
429
- converter = lambda x : np .asarray (pd .Series (x ))
430
- return converter (values .ravel ()).reshape (values .shape )
423
+ return np .asarray (pd .Series (values .ravel ())).reshape (values .shape )
Original file line number Diff line number Diff line change @@ -119,11 +119,11 @@ def _as_compatible_data(data, fastpath=False):
119
119
data = np .asarray (data )
120
120
121
121
if isinstance (data , np .ndarray ):
122
- data = common . _possibly_convert_objects ( data )
123
- if data . dtype . kind == 'M' :
124
- # TODO: automatically cast arrays of datetime objects as well
122
+ if data . dtype . kind == 'O' :
123
+ data = common . _possibly_convert_objects ( data )
124
+ elif data . dtype . kind == 'M' :
125
125
data = np .asarray (data , 'datetime64[ns]' )
126
- if data .dtype .kind == 'm' :
126
+ elif data .dtype .kind == 'm' :
127
127
data = np .asarray (data , 'timedelta64[ns]' )
128
128
129
129
return _maybe_wrap_data (data )
Original file line number Diff line number Diff line change @@ -151,12 +151,14 @@ def test_concat(self):
151
151
152
152
def test_missing_methods (self ):
153
153
v = self .lazy_var
154
- with self .assertRaisesRegexp (NotImplementedError , 'dask' ):
155
- v .conj ()
156
- with self .assertRaisesRegexp (NotImplementedError , 'dask' ):
154
+ try :
157
155
v .argsort ()
158
- with self .assertRaisesRegexp (NotImplementedError , 'dask' ):
156
+ except NotImplementedError as err :
157
+ self .assertIn ('dask' , str (err ))
158
+ try :
159
159
v [0 ].item ()
160
+ except NotImplementedError as err :
161
+ self .assertIn ('dask' , str (err ))
160
162
161
163
def test_ufuncs (self ):
162
164
u = self .eager_var
You can’t perform that action at this time.
0 commit comments