0
Follow
0
View

Why does np.linalg.solve give me an error when trying to solve a 16x16 system of equations?

dengwei99 注册会员
2023-01-25 10:39

The list of lists returned by get_nth_matrix(16) contains integers that are too large to fit into numpy integer types. When you use np.linalg.solve() this list of lists gets converted into a numpy array, but because of this size issue, it produces an array of python objects. The error occurs since np.linalg.solve() can't handle this type of an array. You can replace the last line of get_nth_matrix() with

return np.array(coeficients, dtype=float), augment

to fix this - at least for the values that will not overflow the float type.

About the Author

Question Info

Publish Time
2023-01-25 10:39
Update Time
2023-01-25 10:39

Related Question

size of查看结构体内存

Python stomp升级到8.0.1导致SSL库未找到错误

IDEA Tomcat Context initialization failed org.springframework.

Tomcat 9 HSTS配置在8880端口不工作

如何节省df.To_csv到首选位置而不是桌面?

列引用“customer_id”有歧义

不能在Qt Creator中构建android应用程序

移动物体到Vector3位置,保持重力

如何在React原生应用程序中过滤Firebase Firestore数组数据?

tensorflow里没有tutorials