Skip to content

Commit e1dd4db

Browse files
committed
change location of initialized = false statement to top of the __init__ function
1 parent 298dc8a commit e1dd4db

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pydiso/mkl_solver.pyx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ cdef class MKLPardisoSolver:
247247
>>> np.allclose(x, x_solved)
248248
True
249249
'''
250+
self._initialized = False
250251
n_row, n_col = A.shape
251252
if n_row != n_col:
252253
raise ValueError("Matrix is not square")
@@ -277,14 +278,11 @@ cdef class MKLPardisoSolver:
277278
"matrix dtype and matrix_type not consistent, expected a complex matrix"
278279
)
279280

280-
281281
if self.mat_type in [-2, 2, -4, 4, 6]:
282282
A = sp.triu(A, format='csr')
283283
A = _ensure_csr(A)
284284
A.sort_indices()
285285

286-
287-
self._initialized = False
288286
#set integer length
289287
integer_len = A.indices.itemsize
290288
self._is_32 = integer_len == sizeof(int_t)

0 commit comments

Comments
 (0)