mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01:00
style: multiple spaces after keyword removed.
This commit is contained in:
parent
50d975a181
commit
f31bf78350
1 changed files with 3 additions and 3 deletions
|
@ -262,7 +262,7 @@ def _mat_mat_op(op, obs, **kwargs):
|
||||||
def eigh(obs, **kwargs):
|
def eigh(obs, **kwargs):
|
||||||
"""Computes the eigenvalues and eigenvectors of a given hermitian matrix of Obs according to np.linalg.eigh."""
|
"""Computes the eigenvalues and eigenvectors of a given hermitian matrix of Obs according to np.linalg.eigh."""
|
||||||
if version.parse(np.__version__) >= version.parse("1.25.0"):
|
if version.parse(np.__version__) >= version.parse("1.25.0"):
|
||||||
raise NotImplementedError("eigh error propagation is not working with numpy>=1.25 and autograd==1.5.")
|
raise NotImplementedError("eigh error propagation is not working with numpy>=1.25 and autograd==1.5.")
|
||||||
w = derived_observable(lambda x, **kwargs: anp.linalg.eigh(x)[0], obs)
|
w = derived_observable(lambda x, **kwargs: anp.linalg.eigh(x)[0], obs)
|
||||||
v = derived_observable(lambda x, **kwargs: anp.linalg.eigh(x)[1], obs)
|
v = derived_observable(lambda x, **kwargs: anp.linalg.eigh(x)[1], obs)
|
||||||
return w, v
|
return w, v
|
||||||
|
@ -271,7 +271,7 @@ def eigh(obs, **kwargs):
|
||||||
def eig(obs, **kwargs):
|
def eig(obs, **kwargs):
|
||||||
"""Computes the eigenvalues of a given matrix of Obs according to np.linalg.eig."""
|
"""Computes the eigenvalues of a given matrix of Obs according to np.linalg.eig."""
|
||||||
if version.parse(np.__version__) >= version.parse("1.25.0"):
|
if version.parse(np.__version__) >= version.parse("1.25.0"):
|
||||||
raise NotImplementedError("eig error propagation is not working with numpy>=1.25 and autograd==1.5.")
|
raise NotImplementedError("eig error propagation is not working with numpy>=1.25 and autograd==1.5.")
|
||||||
w = derived_observable(lambda x, **kwargs: anp.real(anp.linalg.eig(x)[0]), obs)
|
w = derived_observable(lambda x, **kwargs: anp.real(anp.linalg.eig(x)[0]), obs)
|
||||||
return w
|
return w
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ def pinv(obs, **kwargs):
|
||||||
def svd(obs, **kwargs):
|
def svd(obs, **kwargs):
|
||||||
"""Computes the singular value decomposition of a matrix of Obs."""
|
"""Computes the singular value decomposition of a matrix of Obs."""
|
||||||
if version.parse(np.__version__) >= version.parse("1.25.0"):
|
if version.parse(np.__version__) >= version.parse("1.25.0"):
|
||||||
raise NotImplementedError("svd error propagation is not working with numpy>=1.25 and autograd==1.5.")
|
raise NotImplementedError("svd error propagation is not working with numpy>=1.25 and autograd==1.5.")
|
||||||
u = derived_observable(lambda x, **kwargs: anp.linalg.svd(x, full_matrices=False)[0], obs)
|
u = derived_observable(lambda x, **kwargs: anp.linalg.svd(x, full_matrices=False)[0], obs)
|
||||||
s = derived_observable(lambda x, **kwargs: anp.linalg.svd(x, full_matrices=False)[1], obs)
|
s = derived_observable(lambda x, **kwargs: anp.linalg.svd(x, full_matrices=False)[1], obs)
|
||||||
vh = derived_observable(lambda x, **kwargs: anp.linalg.svd(x, full_matrices=False)[2], obs)
|
vh = derived_observable(lambda x, **kwargs: anp.linalg.svd(x, full_matrices=False)[2], obs)
|
||||||
|
|
Loading…
Add table
Reference in a new issue