module 'numpy.linalg' has no attribute 'null_space'
时间: 2023-09-21 13:11:34 浏览: 72
As an AI language model, I cannot access your local environment to check the version of NumPy you are using. However, the error message suggests that the version of NumPy you are using does not have the attribute `null_space` in the `numpy.linalg` module.
The `null_space` function was introduced in NumPy version 1.13, so you need to make sure that you have installed a version of NumPy that is equal or greater than 1.13. To upgrade your NumPy version, you can run the following command in your terminal:
```
pip install --upgrade numpy
```
If you have already installed NumPy version 1.13 or later and are still encountering this error, try importing the function directly from the `scipy.linalg` module instead:
```
from scipy.linalg import null_space
```