guynir42 / AstroRetriever

A package used for downloading and processing images from various astronomical surveys
Other
4 stars 2 forks source link

xarray runtime warning #109

Open guynir42 opened 1 year ago

guynir42 commented 1 year ago

Right now we are ignoring this warning on load/save but it should be investigated:

  File "/home/guyn/Dropbox/python/AstroRetriever/src/project.py", line 966, in run
    self.analysis.analyze_sources(source_batch)
  File "/home/guyn/Dropbox/python/AstroRetriever/src/analysis.py", line 304, in analyze_sources
    self._save_histograms(temp=True)
  File "/home/guyn/Dropbox/python/AstroRetriever/src/analysis.py", line 668, in _save_histograms
    hist.save(suffix=suffix)
  File "/home/guyn/Dropbox/python/AstroRetriever/src/histogram.py", line 964, in save
    self.data.to_netcdf(fullname, mode="w")
  File "/home/guyn/Dropbox/python/AstroRetriever/venv/lib/python3.8/site-packages/xarray/core/dataset.py", line 1912, in to_netcdf
    return to_netcdf(  # type: ignore  # mypy cannot resolve the overloads:(
  File "/home/guyn/Dropbox/python/AstroRetriever/venv/lib/python3.8/site-packages/xarray/backends/api.py", line 1178, in to_netcdf
    engine = _get_default_engine(path_or_file)
  File "/home/guyn/Dropbox/python/AstroRetriever/venv/lib/python3.8/site-packages/xarray/backends/api.py", line 141, in _get_default_engine
    return _get_default_engine_netcdf()
  File "/home/guyn/Dropbox/python/AstroRetriever/venv/lib/python3.8/site-packages/xarray/backends/api.py", line 119, in _get_default_engine_netcdf
    import netCDF4  # noqa: F401
  File "/home/guyn/Dropbox/python/AstroRetriever/venv/lib/python3.8/site-packages/netCDF4/__init__.py", line 3, in <module>
    from ._netCDF4 import *
  File "src/netCDF4/_netCDF4.pyx", line 1, in init netCDF4._netCDF4
RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility. Expected 16 from C header, got 96 from PyObject