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 external warnings #1208

Closed
wants to merge 4 commits into from
Closed

Commits on Aug 17, 2024

  1. Require scikit-learn>=1.0

    Resolves an large amount of warnings of the type DeprecationWarning: `np.float` is a deprecated alias for the builtin `float` that were present in scikit-learn when using NumPy > 1.20.
    
    scikit-learn>=1.0 is also ABI stable and follows semantic versioning, making maintaining a range of versions easier.
    EwoutH committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    eba7397 View commit details
    Browse the repository at this point in the history
  2. Resolve pandas SettingWithCopyWarning

    Resolves the following warning:
    
    tests/test_osmnx.py::test_features
      /home/runner/work/osmnx/osmnx/osmnx/features.py:684: SettingWithCopyWarning: 
      A value is trying to be set on a copy of a slice from a DataFrame.
      Try using .loc[row_indexer,col_indexer] = value instead
      
      See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
        gdf.loc[:, "geometry"] = gdf["geometry"].make_valid()
    EwoutH committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    6b11d9b View commit details
    Browse the repository at this point in the history
  3. Fix NumPy VisibleDeprecationWarning in _verify_edge_attribute function

    Resolved a VisibleDeprecationWarning by specifying dtype=object when creating a NumPy array from potentially ragged nested sequences in the _verify_edge_attribute function. This ensures that the array can handle irregular shapes without raising deprecation warnings, maintaining compatibility with future NumPy versions.
    
    
    tests/test_osmnx.py::test_routing
      /home/runner/work/osmnx/osmnx/osmnx/routing.py:473: 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.
        values_float = (np.array(tuple(G.edges(data=attr)))[:, 2]).astype(float)
    EwoutH committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    8733d88 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2024

  1. Configuration menu
    Copy the full SHA
    7cb893e View commit details
    Browse the repository at this point in the history