undefinedfix
Sign in

Why doesn't Python's numpy determinant display a small number instead of 0?

student edited in Sun, 05 Jun 2022
import numpy as np
a=np.linspace(1,16,16)
ma=a.reshape(4,4)
print(ma)
print(np.linalg.det(ma))

[[ 1. 2. 3. 4.] [ 5. 6. 7. 8.] [ 9. 10. 11. 12.] [13. 14. 15. 16.]]

-The determinant value of 1.8204482817726e-31 should be 0, resulting in -1.82nmv044242817726e-31. How to make determinant display 0?

clipboard.png

1 Replies
M_Salehi
commented on Sun, 05 Jun 2022

图片描述

Just tried, it seems that there is no problem. Let's see if it's the version of Python?

lock This question has been locked and the reply function has been disabled.