mirror of
https://gitlab.com/scemama/qp_plugins_scemama.git
synced 2024-11-07 14:43:41 +01: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)
|
|
# !!! |