mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-16 20:43:41 +02:00
mat_mat_op renamed to _mat_mat_op
This commit is contained in:
parent
a24e608413
commit
ad53f28e46
3 changed files with 9 additions and 9 deletions
|
@ -5,7 +5,7 @@ import matplotlib.pyplot as plt
|
||||||
import scipy.linalg
|
import scipy.linalg
|
||||||
from .pyerrors import Obs, dump_object
|
from .pyerrors import Obs, dump_object
|
||||||
from .fits import standard_fit
|
from .fits import standard_fit
|
||||||
from .linalg import eigh, mat_mat_op
|
from .linalg import eigh, inv, cholesky
|
||||||
from .roots import find_root
|
from .roots import find_root
|
||||||
|
|
||||||
|
|
||||||
|
@ -187,10 +187,10 @@ class Corr:
|
||||||
def Eigenvalue(self, t0, state=1):
|
def Eigenvalue(self, t0, state=1):
|
||||||
G = self.smearing_symmetric()
|
G = self.smearing_symmetric()
|
||||||
G0 = G.content[t0]
|
G0 = G.content[t0]
|
||||||
L = mat_mat_op(anp.linalg.cholesky, G0)
|
L = cholesky(G0)
|
||||||
Li = mat_mat_op(anp.linalg.inv, L)
|
Li = inv(L)
|
||||||
LT = L.T
|
LT = L.T
|
||||||
LTi = mat_mat_op(anp.linalg.inv, LT)
|
LTi = inv(LT)
|
||||||
newcontent = []
|
newcontent = []
|
||||||
for t in range(self.T):
|
for t in range(self.T):
|
||||||
Gt = G.content[t]
|
Gt = G.content[t]
|
||||||
|
|
|
@ -171,11 +171,11 @@ def matmul(*operands):
|
||||||
|
|
||||||
|
|
||||||
def inv(x):
|
def inv(x):
|
||||||
return mat_mat_op(anp.linalg.inv, x)
|
return _mat_mat_op(anp.linalg.inv, x)
|
||||||
|
|
||||||
|
|
||||||
def cholesky(x):
|
def cholesky(x):
|
||||||
return mat_mat_op(anp.linalg.cholesky, x)
|
return _mat_mat_op(anp.linalg.cholesky, x)
|
||||||
|
|
||||||
|
|
||||||
def scalar_mat_op(op, obs, **kwargs):
|
def scalar_mat_op(op, obs, **kwargs):
|
||||||
|
@ -203,7 +203,7 @@ def scalar_mat_op(op, obs, **kwargs):
|
||||||
return derived_observable(_mat, raveled_obs, **kwargs)
|
return derived_observable(_mat, raveled_obs, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def mat_mat_op(op, obs, **kwargs):
|
def _mat_mat_op(op, obs, **kwargs):
|
||||||
"""Computes the matrix to matrix operation op to a given matrix of Obs."""
|
"""Computes the matrix to matrix operation op to a given matrix of Obs."""
|
||||||
# Use real representation to calculate matrix operations for complex matrices
|
# Use real representation to calculate matrix operations for complex matrices
|
||||||
if isinstance(obs.ravel()[0], CObs):
|
if isinstance(obs.ravel()[0], CObs):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue