@@ -504,7 +504,7 @@ def ResetHypreDiag(M, idx, value=1.0):
504504 np .min (jcn ), np .max (jcn ), (m , n ))
505505 raise
506506
507- idx = np .array (idx , dtype = int , copy = False )
507+ idx = np .asarray (idx , dtype = int )
508508 ii = idx [np .logical_and (idx >= ilower , idx <= iupper )]
509509 mat [ii - ilower , ii ] = value
510510 # for ii in idx:
@@ -529,7 +529,7 @@ def ResetHypreRow(M, idx):
529529 n = M .N ()
530530 from scipy .sparse import coo_matrix , lil_matrix
531531
532- k = np .in1d (irn , idx )
532+ k = np .isin (irn , idx )
533533 data [k ] = 0.0
534534
535535 mat = coo_matrix ((data , (irn - ilower , jcn )), shape = (m , n )).tocsr ()
@@ -553,7 +553,7 @@ def ResetHypreCol(M, idx):
553553 n = M .N ()
554554 from scipy .sparse import coo_matrix , lil_matrix
555555
556- k = np .in1d (jcn , idx )
556+ k = np .isin (jcn , idx )
557557 data [k ] = 0.0
558558
559559 mat = coo_matrix ((data , (irn - ilower , jcn )), shape = (m , n )).tocsr ()
@@ -583,7 +583,7 @@ def ReadHypreDiag(M, idx):
583583 np .min (jcn ), np .max (jcn ), (m , n ))
584584 raise
585585
586- idx = np .array (idx , dtype = int , copy = False )
586+ idx = np .asarray (idx , dtype = int )
587587 ii = idx [np .logical_and (idx >= ilower , idx <= iupper )]
588588
589589 tmp = mat [ii - ilower , ii ].toarray ().flatten ()
0 commit comments