With numpy 1.25 and libsonata 0.1.21, this code causes a DeprecationWarning: ```python import numpy as np import libsonata cc = libsonata.CircuitConfig.from_file("tests/data/config/circuit_config.json") pop = cc.edge_population("edges-AB") ids = np.asarray([1]) pop.afferent_edges(ids) ``` Result: ```python <ipython-input-1-d0433371129e>:6: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.) pop.afferent_edges(ids) Selection([(0, 1), (2, 4)]) ``` While these calls don't cause any warning: ```python In [2]: ids = [1] ...: pop.afferent_edges(ids) ...: Selection([(0, 1), (2, 4)]) In [3]: ids = 1 ...: pop.afferent_edges(ids) Selection([(0, 1), (2, 4)]) ```
With numpy 1.25 and libsonata 0.1.21, this code causes a DeprecationWarning:
Result:
While these calls don't cause any warning: