-
-
Notifications
You must be signed in to change notification settings - Fork 4
FAILED test_all.py::test_load_hires - TypeError: only integer scalar arrays can be converted to a scalar index #1
Description
- operating system: Ubuntu 20.04
- Python version: 3.8
when I try to run the tests:
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.8.5, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3.8
cachedir: .pytest_cache
rootdir: /home/flavio/dados/goes/lfa/goespy/GOESplot-master, configfile: pytest.ini
collected 2 items
test_all.py::test_load_preview PASSED [ 50%]
test_all.py::test_load_hires FAILED [100%]
==================================================================================================== FAILURES =====================================================================================================
_________________________________________________________________________________________________ test_load_hires _________________________________________________________________________________________________
def test_load_hires():
pytest.importorskip("netCDF4")
img = gq.load(R / "goes13.2017.233.080017.BAND_02.nc")
test_all.py:18:
../io.py:54: in load
img = loadhires(fn, downsample)
fn = PosixPath('/home/flavio/data/goespy/GOESplot-master/goesplot/tests/goes13.2017.233.080017.BAND_02.nc'), downsample = None
def loadhires(fn: Path, downsample: int = None) -> xarray.DataArray:
"""
loads and modifies GOES data
"""
if netCDF4 is None:
raise ImportError("netCDF4 needed for hires data. pip install netcdf4")
with netCDF4.Dataset(fn, "r") as f:
t = datetime.utcfromtimestamp(f["time"][:])
E TypeError: only integer scalar arrays can be converted to a scalar index
../io.py:87: TypeError
============================================================================================= short test summary info =============================================================================================
FAILED test_all.py::test_load_hires - TypeError: only integer scalar arrays can be converted to a scalar index
=========================================================================================== 1 failed, 1 passed in 0.17s ===========================================================================================