@@ -392,8 +392,7 @@ def norm(input, ord=None, axis=None, keepdims=False):
392392 return call_origin (numpy .linalg .norm , input , ord , axis , keepdims )
393393
394394
395- #linalg.qr(a, mode='reduced')
396- def qr (a , mode = 'complete' ):
395+ def qr (x1 , mode = 'reduced' ):
397396 """
398397 Compute the qr factorization of a matrix.
399398
@@ -409,15 +408,18 @@ def qr(a, mode='complete'):
409408
410409 """
411410
412- if not use_origin_backend (a ):
413- if not isinstance (a , dparray ):
411+ if not use_origin_backend (x1 ):
412+ if not isinstance (x1 , dparray ):
414413 pass
415- elif not mode == 'complete ' :
414+ elif mode != 'reduced ' :
416415 pass
417416 else :
418- return dpnp_qr (a , mode )
417+ # I see something wrong with it. it is couse SIGSEGV in 1 of 10 test times
418+ res_q , res_r = dpnp_qr (x1 , mode )
419+
420+ return (res_q , res_r )
419421
420- return call_origin (numpy .linalg .qr , a , mode )
422+ return call_origin (numpy .linalg .qr , x1 , mode )
421423
422424
423425def svd (a , full_matrices = True , compute_uv = True , hermitian = False ):
0 commit comments