sdtaylor / GrasslandModels

MIT License
0 stars 0 forks source link

fix warnings #41

Closed sdtaylor closed 3 years ago

sdtaylor commented 3 years ago
/home/shawn/miniconda3/lib/python3.7/site-packages/scipy/fft/__init__.py:97
  /home/shawn/miniconda3/lib/python3.7/site-packages/scipy/fft/__init__.py:97: DeprecationWarning: The module numpy.dual is deprecated.  Instead of using dual, use the functions directly from numpy or scipy.
    from numpy.dual import register_func

/home/shawn/miniconda3/lib/python3.7/site-packages/scipy/sparse/sputils.py:17: 15 tests with warnings
  /home/shawn/miniconda3/lib/python3.7/site-packages/scipy/sparse/sputils.py:17: DeprecationWarning: `np.typeDict` is a deprecated alias for `np.sctypeDict`.
    supported_dtypes = [np.typeDict[x] for x in supported_dtypes]

/home/shawn/miniconda3/lib/python3.7/site-packages/scipy/special/orthogonal.py:81
/home/shawn/miniconda3/lib/python3.7/site-packages/scipy/special/orthogonal.py:81
  /home/shawn/miniconda3/lib/python3.7/site-packages/scipy/special/orthogonal.py:81: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    from numpy import (exp, inf, pi, sqrt, floor, sin, cos, around, int,

/home/shawn/miniconda3/lib/python3.7/site-packages/scipy/optimize/lbfgsb.py:339: 37 tests with warnings
test/test_core_models.py: 2 tests with warnings
  /home/shawn/miniconda3/lib/python3.7/site-packages/scipy/optimize/lbfgsb.py:339: DeprecationWarning: tostring() is deprecated. Use tobytes() instead.
    task_str = task.tostring()

/home/shawn/miniconda3/lib/python3.7/site-packages/scipy/optimize/lbfgsb.py:360: 16 tests with warnings
test/test_core_models.py: 1 test with warning
  /home/shawn/miniconda3/lib/python3.7/site-packages/scipy/optimize/lbfgsb.py:360: DeprecationWarning: tostring() is deprecated. Use tobytes() instead.
    task_str = task.tostring().strip(b'\x00').strip()

test/test_core_models.py::test_internal_broadcasting[PhenoGrass-fitted_model0]
test/test_core_models.py::test_phenograss_internal_methods
  /home/shawn/projects/GrasslandModels/GrasslandModels/models/phenograss.py:325: RuntimeWarning: invalid value encountered in power
    g[:] = ((Tmax - Tm[i]) / (Tmax - Topt)) * (((Tm[i] - Tmin) / (Topt - Tmin)) ** (Topt/(Tmax-Topt)))

test/test_core_models.py::test_internal_broadcasting[PhenoGrassNDVI-fitted_model1]
  /home/shawn/projects/GrasslandModels/GrasslandModels/models/phenograss.py:594: RuntimeWarning: invalid value encountered in power
    g[:] = ((Tmax - Tm[i]) / (Tmax - Topt)) * (((Tm[i] - Tmin) / (Topt - Tmin)) ** (Topt/(Tmax-Topt)))

-- Docs: https://docs.pytest.org/en/latest/warnings.html
sdtaylor commented 3 years ago

nevermind these are just old scipy warnings. fixed by upgrading scipy from 1.4 -> 1.7