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
55e5d0e8
Commit
55e5d0e8
authored
Nov 16, 2018
by
Martin Reinecke
Browse files
adjust FieldZeroPadder as well
parent
22fa09fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/field_zero_padder.py
View file @
55e5d0e8
...
...
@@ -36,15 +36,13 @@ class FieldZeroPadder(LinearOperator):
dom
=
self
.
_domain
[
self
.
_space
]
if
not
isinstance
(
dom
,
RGSpace
):
raise
TypeError
(
"RGSpace required"
)
if
dom
.
harmonic
:
raise
TypeError
(
"RGSpace must not be harmonic"
)
if
len
(
new_shape
)
!=
len
(
dom
.
shape
):
raise
ValueError
(
"Shape mismatch"
)
if
any
([
a
<
b
for
a
,
b
in
zip
(
new_shape
,
dom
.
shape
)]):
raise
ValueError
(
"New shape must not be smaller than old shape"
)
self
.
_target
=
list
(
self
.
_domain
)
self
.
_target
[
self
.
_space
]
=
RGSpace
(
new_shape
,
dom
.
distances
)
self
.
_target
[
self
.
_space
]
=
RGSpace
(
new_shape
,
dom
.
distances
,
dom
.
harmonic
)
self
.
_target
=
DomainTuple
.
make
(
self
.
_target
)
self
.
_capability
=
self
.
TIMES
|
self
.
ADJOINT_TIMES
...
...
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