mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-16 20:43:41 +02:00
sinh effective mass implemented
This commit is contained in:
parent
66c443fd63
commit
117a925775
4 changed files with 28 additions and 20 deletions
|
@ -12,11 +12,14 @@ from functools import partial
|
|||
from autograd.extend import defvjp
|
||||
|
||||
_dot = partial(anp.einsum, '...ij,...jk->...ik')
|
||||
|
||||
|
||||
# batched diag
|
||||
_diag = lambda a: anp.eye(a.shape[-1]) * a
|
||||
def _diag(a):
|
||||
return anp.eye(a.shape[-1]) * a
|
||||
|
||||
|
||||
# batched diagonal, similar to matrix_diag in tensorflow
|
||||
|
||||
|
||||
def _matrix_diag(a):
|
||||
reps = anp.array(a.shape)
|
||||
reps[:-1] = 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue