thaler-lab / EnergyFlow

Python package for the EnergyFlow suite of tools.

Home Page:https://energyflow.network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update NumPy use to be compatible with NumPy v2.0

matthewfeickert opened this issue · comments

Relevant for preparing for thaler-lab/Wasserstein#22

../../../../.pyenv/versions/3.11.7/envs/wasserstein-dev/lib/python3.11/site-packages/energyflow/algorithms/einsumfunc.py:15
  /home/feickert/.pyenv/versions/3.11.7/envs/wasserstein-dev/lib/python3.11/site-packages/energyflow/algorithms/einsumfunc.py:15: DeprecationWarning: `np.compat`, which was used during the Python 2 to 3 transition, is deprecated since 1.26.0, and will be removed
    from numpy.compat import basestring

../../../../.pyenv/versions/3.11.7/envs/wasserstein-dev/lib/python3.11/site-packages/energyflow/algorithms/einsumfunc.py:16
  /home/feickert/.pyenv/versions/3.11.7/envs/wasserstein-dev/lib/python3.11/site-packages/energyflow/algorithms/einsumfunc.py:16: DeprecationWarning: numpy.core.multiarray is deprecated and has been renamed to numpy._core.multiarray. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.multiarray.c_einsum.
    from numpy.core.multiarray import c_einsum

../../../../.pyenv/versions/3.11.7/envs/wasserstein-dev/lib/python3.11/site-packages/energyflow/algorithms/einsumfunc.py:17
  /home/feickert/.pyenv/versions/3.11.7/envs/wasserstein-dev/lib/python3.11/site-packages/energyflow/algorithms/einsumfunc.py:17: DeprecationWarning: numpy.core.numeric is deprecated and has been renamed to numpy._core.numeric. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.numeric.asarray.
    from numpy.core.numeric import asarray, asanyarray, result_type, tensordot, dot

../../../../.pyenv/versions/3.11.7/envs/wasserstein-dev/lib/python3.11/site-packages/energyflow/efm.py:44
  /home/feickert/.pyenv/versions/3.11.7/envs/wasserstein-dev/lib/python3.11/site-packages/energyflow/efm.py:44: DeprecationWarning: numpy.core.multiarray is deprecated and has been renamed to numpy._core.multiarray. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.multiarray.c_einsum.
    from numpy.core.multiarray import c_einsum

should all get updated to be NumPy 2.0 compatible.

from numpy.compat import basestring
from numpy.core.multiarray import c_einsum
from numpy.core.numeric import asarray, asanyarray, result_type, tensordot, dot

from numpy.core.multiarray import c_einsum