@@ -392,8 +392,7 @@ def norm(input, ord=None, axis=None, keepdims=False):
392
392
return call_origin (numpy .linalg .norm , input , ord , axis , keepdims )
393
393
394
394
395
- #linalg.qr(a, mode='reduced')
396
- def qr (a , mode = 'complete' ):
395
+ def qr (x1 , mode = 'reduced' ):
397
396
"""
398
397
Compute the qr factorization of a matrix.
399
398
@@ -409,15 +408,18 @@ def qr(a, mode='complete'):
409
408
410
409
"""
411
410
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 ):
414
413
pass
415
- elif not mode == 'complete ' :
414
+ elif mode != 'reduced ' :
416
415
pass
417
416
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 )
419
421
420
- return call_origin (numpy .linalg .qr , a , mode )
422
+ return call_origin (numpy .linalg .qr , x1 , mode )
421
423
422
424
423
425
def svd (a , full_matrices = True , compute_uv = True , hermitian = False ):
0 commit comments