#NEWLINE# @ dec . knownfailureif ( True , 'Ticket #1152, triggers a segfault in rare cases.' ) #NEWLINE# def test_lapack_misaligned( ) : #NEWLINE# #INDENT# M = np . eye ( 10 , dtype = float ) #NEWLINE# R = np . arange ( 100 ) #NEWLINE# R . shape = ( 10 , 10 ) #NEWLINE# S = np . arange ( 20000 , dtype = np . uint8 ) #NEWLINE# S = np . frombuffer ( S . data , offset = 4 , count = 100 , dtype = float ) #NEWLINE# S . shape = ( 10 , 10 ) #NEWLINE# b = np . ones ( 10 ) #NEWLINE# ( LU , piv ) = lu_factor ( S ) #NEWLINE# for ( func , args , kwargs ) in [ ( eig , ( S , ) , dict ( overwrite_a = True ) ) , ( eigvals , ( S , ) , dict ( overwrite_a = True ) ) , ( lu , ( S , ) , dict ( overwrite_a = True ) ) , ( lu_factor , ( S , ) , dict ( overwrite_a = True ) ) , ( lu_solve , ( ( LU , piv ) , b ) , dict ( overwrite_b = True ) ) , ( solve , ( S , b ) , dict ( overwrite_a = True , overwrite_b = True ) ) , ( svd , ( M , ) , dict ( overwrite_a = True ) ) , ( svd , ( R , ) , dict ( overwrite_a = True ) ) , ( svd , ( S , ) , dict ( overwrite_a = True ) ) , ( svdvals , ( S , ) , dict ( ) ) , ( svdvals , ( S , ) , dict ( overwrite_a = True ) ) , ( cholesky , ( M , ) , dict ( overwrite_a = True ) ) , ( qr , ( S , ) , dict ( overwrite_a = True ) ) , ( rq , ( S , ) , dict ( overwrite_a = True ) ) , ( hessenberg , ( S , ) , dict ( overwrite_a = True ) ) , ( schur , ( S , ) , dict ( overwrite_a = True ) ) ] : #NEWLINE# #INDENT# ( yield ( check_lapack_misaligned , func , args , kwargs ) )