Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
e8595a72
Commit
e8595a72
authored
May 24, 2020
by
Lukas Platz
Browse files
fix adjoint subscript computation for pure transpose operations
parent
7f012ec2
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty6/operators/einsum.py
View file @
e8595a72
...
...
@@ -262,8 +262,11 @@ class LinearEinsum(LinearOperator):
iss
,
oss
,
*
_
=
subscripts
.
split
(
"->"
)
iss_spl
=
iss
.
split
(
","
)
adj_iss
=
","
.
join
((
","
.
join
(
iss_spl
[:
-
1
]),
oss
))
self
.
_adj_sscr
=
"->"
.
join
((
adj_iss
,
iss_spl
[
-
1
]))
if
len
(
iss_spl
)
==
1
:
self
.
_adj_sscr
=
"->"
.
join
((
oss
,
iss
))
else
:
adj_iss
=
","
.
join
((
","
.
join
(
iss_spl
[:
-
1
]),
oss
))
self
.
_adj_sscr
=
"->"
.
join
((
adj_iss
,
iss_spl
[
-
1
]))
self
.
_capability
=
self
.
TIMES
|
self
.
ADJOINT_TIMES
def
apply
(
self
,
x
,
mode
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment