Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve bunch of deprecated code #59

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

elbeejay
Copy link
Member

Aims to address #58 but does not solve all warnings.

The below warnings still pop up when running the test suite:

tests/test_synthetic.py: 4 warnings
  /home/jayh/anaconda3/envs/rivgraph/lib/python3.8/site-packages/pandas/core/dtypes/cast.py:1981: DeprecationWarning: An exception was ignored while fetching the attribute `__array_interface__` from an object of type 'Polygon'.  With the exception of `AttributeError` NumPy will always raise this exception in the future.  Raise this deprecation warning to see the original exception. (Warning added NumPy 1.21)
    result[:] = values
tests/test_synthetic.py: 4 warnings
  /home/jayh/anaconda3/envs/rivgraph/lib/python3.8/site-packages/geopandas/array.py:93: DeprecationWarning: An exception was ignored while fetching the attribute `__array_interface__` from an object of type 'Polygon'.  With the exception of `AttributeError` NumPy will always raise this exception in the future.  Raise this deprecation warning to see the original exception. (Warning added NumPy 1.21)
    aout[:] = out
tests/test_verbosity.py: 88762 warnings
  /home/jayh/anaconda3/envs/rivgraph/lib/python3.8/site-packages/scipy/spatial/distance.py:308: DeprecationWarning: scipy.spatial.distance metrics ignoring length-1 dimensions is deprecated in SciPy 1.7 and will raise an error in SciPy 1.9.
    warnings.warn(
tests/test_synthetic.py::test_get_islands
  /home/jayh/anaconda3/envs/rivgraph/lib/python3.8/site-packages/numpy/core/fromnumeric.py:1970: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
    result = asarray(a).shape
tests/test_synthetic.py::test_assigning_inletshore
  /home/jayh/anaconda3/envs/rivgraph/lib/python3.8/site-packages/geopandas/geoseries.py:118: DeprecationWarning: The default dtype for empty Series will be 'object' instead of 'float64' in a future version. Specify a dtype explicitly to silence this warning.
    s = pd.Series(data, index=index, name=name, **kwargs)

But given that many of these relate to the synthetic simple test case, it may also be that the setup / simplifications in that example are creating unusual scenarios that result in warnings.

@jonschwenk jonschwenk merged commit 3427abf into VeinsOfTheEarth:master Jul 26, 2021
@elbeejay elbeejay deleted the dep-warings branch July 26, 2021 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants