def test_input_A_dtypes():
A, b = create_test_A_b_rand(10,0.5)
for d in [np.float16, np.float32, np.int16, np.int32, np.int64, np.complex64,
np.complex128, np.complex128, np.uint16, np.uint32, np.uint64]:
with pytest.raises(TypeError):
ps.solve(A.astype(d), b)
#def test_input_A_empty_col():
# A, b = create_test_A_b_rand(25, 0.1)
# A = np.array(A.todense())
# A[0,:] = 0
# A[:,0] = 0
# A[0, 1] = 1
# Asp = sp.csr_matrix(A)
# with pytest.warns(PyPardisoWarning):
# x = ps.solve(A,b)
# print(x)
# dosen't necessarily return inf value, can also be just really big
评论列表
文章目录