diff --git a/.travis.yml b/.travis.yml index 1d59fe78..092cae76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ sudo: false # - 3.6 env: - - TEST_TARGET=unit PYTHON_TARGET=2.7 +# - TEST_TARGET=unit PYTHON_TARGET=2.7 - TEST_TARGET=unit PYTHON_TARGET=3.6 - TEST_TARGET=unit PYTHON_TARGET=3.7 # - TEST_TARGET=integration diff --git a/cis/__init__.py b/cis/__init__.py index 24b81cd3..627cf20d 100644 --- a/cis/__init__.py +++ b/cis/__init__.py @@ -17,7 +17,7 @@ ungridded, but not a mix. For ungridded data lists it is assumed that all objects share the same coordinates. """ __author__ = "David Michel, Daniel Wallis, Duncan Watson-Parris, Richard Wilkinson, Ian Bush, Matt Kendall, John Holt" -__version__ = "1.7.1" +__version__ = "1.7.2" __status__ = "Stable" __website__ = "http://www.cistools.net/" diff --git a/cis/collocation/col_implementations.py b/cis/collocation/col_implementations.py index 0220c5cf..2c614a0e 100644 --- a/cis/collocation/col_implementations.py +++ b/cis/collocation/col_implementations.py @@ -295,10 +295,10 @@ def __init__(self, h_sep=None, a_sep=None, p_sep=None, t_sep=None): self.checks.append(self.time_constraint) def time_constraint(self, points, ref_point): - return np.nonzero(np.abs(points.time - ref_point.time) < self.t_sep)[0] + return (np.abs(points.time - ref_point.time) < self.t_sep).to_numpy().nonzero()[0] def alt_constraint(self, points, ref_point): - return np.nonzero(np.abs(points.altitude - ref_point.altitude) < self.a_sep)[0] + return (np.abs(points.altitude - ref_point.altitude) < self.a_sep).to_numpy().nonzero()[0] def pressure_constraint(self, points, ref_point): greater_pressures = np.nonzero(((points.air_pressure.values / ref_point.air_pressure) < self.p_sep) & diff --git a/cis/test/unit/test_io/test_ungridded_data.py b/cis/test/unit/test_io/test_ungridded_data.py index 3206661e..add99de9 100644 --- a/cis/test/unit/test_io/test_ungridded_data.py +++ b/cis/test/unit/test_io/test_ungridded_data.py @@ -104,7 +104,7 @@ def test_GIVEN_ungridded_data_WHEN_call_as_data_frame_THEN_returns_valid_data_fr assert_that(df['rainfall_flux'][5] == 6) assert_that(df['latitude'][17] == 0) - assert_that(df['latitude'].ix[datetime(1984,8,31)][0] == 10) + assert_that(df.loc[datetime(1984,8,31), 'latitude'][0] == 10) assert_that(df['rainfall_flux'].median() == 25.5) @skip_pandas diff --git a/doc/whats_new_1.7.rst b/doc/whats_new_1.7.rst index c167156c..024ec4b0 100644 --- a/doc/whats_new_1.7.rst +++ b/doc/whats_new_1.7.rst @@ -31,3 +31,9 @@ CIS 1.7.1 fixes =============== * Fixed an issue where interpolation would unmask masked source arrays * Support for Pandas 0.24 + +CIS 1.7.2 fixes +=============== + * We no-longer officially support Python 2.7. We won't yet explicitly remove Python 2.7 features but we no longer +test against Python 2 and won't fix issues relating to it. + * Support for Pandas 1.1