mirror of
https://gitlab.com/scemama/qp_plugins_scemama.git
synced 2024-08-31 00:03:50 +02:00
10 lines
221 B
Python
10 lines
221 B
Python
# !!!
|
|
import numpy as np
|
|
# !!!
|
|
def QR_fact(X):
|
|
Q, R = np.linalg.qr(X, mode="reduced")
|
|
D = np.diag( np.sign( np.diag(R) ) )
|
|
Qunique = np.dot(Q,D)
|
|
#Runique = np.dot(D,R)
|
|
return(Qunique)
|
|
# !!! |