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
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
NIFTy
Commits
e01faa70
Commit
e01faa70
authored
May 08, 2020
by
Martin Reinecke
Browse files
fix creating a ScalingOperator from a complex value
parent
e71ecace
Pipeline
#74589
passed with stages
in 20 minutes and 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/sugar.py
View file @
e01faa70
...
...
@@ -350,7 +350,7 @@ def makeOp(input, dom=None):
if
not
dom
==
input
.
domain
:
raise
ValueError
(
"domain mismatch"
)
if
input
.
domain
is
DomainTuple
.
scalar_domain
():
return
ScalingOperator
(
input
.
domain
,
float
(
input
.
val
)
)
return
ScalingOperator
(
input
.
domain
,
input
.
val
[()]
)
if
isinstance
(
input
,
Field
):
return
DiagonalOperator
(
input
)
if
isinstance
(
input
,
MultiField
):
...
...
Write
Preview
Markdown
is supported
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