Skip to content

Make numpy dependency from types-networkx optional #14760

@achimnol

Description

@achimnol

I'm using networkx to implement NUMA affinity maps in a system management control plane.
Recently I added types-networkx and it brought numpy dependency as well, breaking some of our CI and deployments that previously did not use any "scientific" pacakges like numpy.

I'd like to reuse the pure graph algorithms only and do not use the numpy array conversion APIs.
Could we make it an optional dependency?

https://github.com/python/typeshed/blob/main/stubs/networkx/METADATA.toml#L4

The upstream package also defines numpy as a part of optional dependencies:
https://github.com/networkx/networkx/blob/da991effb0509d5ef59516c1b3c0848bb847c3b8/pyproject.toml#L38
https://github.com/networkx/networkx/blob/da991effb0509d5ef59516c1b3c0848bb847c3b8/pyproject.toml#L63
though the extra set name "default" in the context of "optional" looks weired to me...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions