module 'numpy.typing' has no attribute 'NDArray'
COMoER opened this issue · 1 comments
When importing nashpy module, an error occurs that "module 'numpy.typing' has no attribute 'NDArray'". The version of Numpy is 1.20.1 the version of python is 3.8.8 and the version of Nashpy is 0.0.30. When I install the version 0.0.25 of Nashpy, I import the module successfully.
The whole log of this error is:
File "/home/comoer/Application/anaconda3/lib/python3.8/site-packages/nashpy/init.py", line 2, in
from .game import Game
File "/home/comoer/Application/anaconda3/lib/python3.8/site-packages/nashpy/game.py", line 5, in
from .algorithms.lemke_howson import lemke_howson
File "/home/comoer/Application/anaconda3/lib/python3.8/site-packages/nashpy/algorithms/lemke_howson.py", line 8, in
from nashpy.integer_pivoting import (
File "/home/comoer/Application/anaconda3/lib/python3.8/site-packages/nashpy/integer_pivoting/init.py", line 1, in
from .integer_pivoting import *
File "/home/comoer/Application/anaconda3/lib/python3.8/site-packages/nashpy/integer_pivoting/integer_pivoting.py", line 10, in
def make_tableau(M: npt.NDArray) -> npt.NDArray:
AttributeError: module 'numpy.typing' has no attribute 'NDArray'
I have found the cause. The expression 'numpy.typing.NDArray' is new in version 1.21 of numpy. But I successfully installed Nashpy using 'pip' method.