diff --git a/.travis.yml b/.travis.yml index 3404d87f..4de057c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,9 +20,9 @@ before_install: script: #- conda install -c uvcdat/label/nightly -c conda-forge -c uvcdat libcf distarray cdtime libcdms cdat_info numpy esmf esmpy libdrs_f pyopenssl nose requests flake8 - conda create -n py3 python=3.6 -- conda install -n py3 -c conda-forge -c uvcdat libcf distarray cdtime libcdms cdat_info numpy libdrs_f pyopenssl nose requests flake8 myproxyclient libnetcdf netcdf-fortran=4.4.4=3 +- conda install -n py3 -c conda-forge -c uvcdat libcf distarray cdtime libcdms cdat_info numpy libdrs_f pyopenssl nose requests flake8 myproxyclient - source activate py3 -- if [ "$TRAVIS_OS_NAME" = "linux" ]; then conda install -n py3 -c nesii/channel/dev-esmf -c conda-forge esmpy=7.1.0.dev34 netcdf-fortran=4.4.4=3; fi +- if [ "$TRAVIS_OS_NAME" = "linux" ]; then conda install -n py3 -c nesii/channel/dev-esmf -c conda-forge esmpy=7.1.0.dev34; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then conda install -n py3 -c nadeau1 -c conda-forge esmf esmpy; fi - export UVCDAT_ANONYMOUS_LOG=False - echo $TRAVIS_BRANCH @@ -38,7 +38,7 @@ script: - conda create -n py2 python=2.7 - source activate py2 - which python -- conda install -c conda-forge -c uvcdat libcf distarray cdtime libcdms cdat_info numpy esmf esmpy libdrs_f pyopenssl nose requests flake8 netcdf-fortran=4.4.4=3 +- conda install -c conda-forge -c uvcdat libcf distarray cdtime libcdms cdat_info numpy esmf esmpy libdrs_f pyopenssl nose requests flake8 - export UVCDAT_ANONYMOUS_LOG=False - python setup.py install - python run_tests.py -v2 -s diff --git a/Lib/MV2.py b/Lib/MV2.py index 4da7e1d7..16ee25a6 100644 --- a/Lib/MV2.py +++ b/Lib/MV2.py @@ -5,7 +5,7 @@ import numpy from numpy import character, float, float32, float64 # noqa from numpy import int, int8, int16, int32, int64, byte # noqa -from numpy import ubyte, uint8, uint16, uint32, uint64, long # noqa +from numpy import ubyte, uint8, uint16, uint32, uint64, long # noqa from numpy.ma import allclose, allequal, common_fill_value # noqa from numpy.ma import make_mask_none, dot, filled # noqa from numpy.ma import getmask, getmaskarray, identity # noqa @@ -341,15 +341,6 @@ def _conv_axis_arg(axis): return axis -def squeeze(x): - "call numpy.squeeze on ndarray and rebuild tvariable." - # ta = _makeMaskedArg(x) - maresult = numpy.squeeze(x._data) - axes, attributes, id, grid = _extractMetadata(x) - return TransientVariable( - maresult, axes=axes, attributes=attributes, grid=grid, id=id) - - def is_masked(x): "Is x a 0-D masked value?" return isMaskedArray(x) and x.size == 1 and x.ndim == 0 and x.mask.item() diff --git a/Lib/avariable.py b/Lib/avariable.py index 5337d04d..ed99af63 100644 --- a/Lib/avariable.py +++ b/Lib/avariable.py @@ -1497,9 +1497,6 @@ def getGridIndices(self): # numpy.ma overrides - def squeeze(self): - return(MV.squeeze(self)) - def __getitem__(self, key): if isinstance(key, tuple): speclist = self._process_specs(key, {}) diff --git a/Lib/hgrid.py b/Lib/hgrid.py index 7b5a504e..9666c5ec 100644 --- a/Lib/hgrid.py +++ b/Lib/hgrid.py @@ -676,7 +676,7 @@ def isClose(self, g): def checkAxes(self, axes): """Return 1 iff every element of self.getAxisList() is in the list 'axes'.""" for item in self.getAxisList(): - if item.shape not in [axis.shape for axis in axes]: + if item not in axes: result = 0 break else: diff --git a/Lib/tvariable.py b/Lib/tvariable.py index 0f4e5ada..e92b4ffc 100644 --- a/Lib/tvariable.py +++ b/Lib/tvariable.py @@ -121,8 +121,6 @@ def __array_finalize__(self, obj): def __copy__(self): return numpy.ma.MaskedArray.copy(self) - squeeze = AbstractVariable.squeeze - __mul__ = AbstractVariable.__mul__ __rmul__ = AbstractVariable.__rmul__ __imul__ = AbstractVariable.__imul__ diff --git a/ci-support/circleci_mac_dep.sh b/ci-support/circleci_mac_dep.sh index 877f8d08..7f360a3a 100644 --- a/ci-support/circleci_mac_dep.sh +++ b/ci-support/circleci_mac_dep.sh @@ -12,11 +12,11 @@ echo $cmd $cmd # Create Python 3 environment -cmd="conda create -n py3 -c uvcdat/label/nightly -c conda-forge -c uvcdat libcf distarray cdtime libcdms cdat_info numpy libdrs_f pyopenssl nose requests flake8 myproxyclient libnetcdf netcdf-fortran=4.4.4=3" +cmd="conda create -n py3 -c uvcdat/label/nightly -c conda-forge -c uvcdat libcf distarray cdtime libcdms cdat_info numpy libdrs_f pyopenssl nose requests flake8 myproxyclient" echo $cmd $cmd -cmd="conda install -n py3 -c nadeau1 -c conda-forge esmf esmpy netcdf-fortran=4.4.4=3" +cmd="conda install -n py3 -c nadeau1 -c conda-forge esmf esmpy" echo $cmd $cmd @@ -30,7 +30,7 @@ cmd="source activate py2" echo $cmd $cmd -cmd="conda install -n py2 -c uvcdat/label/nightly -c conda-forge -c uvcdat libcf distarray cdtime libcdms cdat_info numpy esmf esmpy libdrs_f pyopenssl nose requests flake8 myproxyclient netcdf-fortran=4.4.4=3" +cmd="conda install -n py2 -c uvcdat/label/nightly -c conda-forge -c uvcdat libcf distarray cdtime libcdms cdat_info numpy esmf esmpy libdrs_f pyopenssl nose requests flake8 myproxyclient" echo $cmd $cmd