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
215fcdff
Commit
215fcdff
authored
Jan 22, 2019
by
Martin Reinecke
Browse files
add docs for FieldZeroPadder
parent
3aaa3a70
Changes
2
Hide whitespace changes
Inline
Side-by-side
docs/generate.sh
View file @
215fcdff
# rm -rf docs/build docs/source/mod
sphinx-apidoc
-e
-o
docs/source/mod nifty5
sphinx-build
-b
html docs/source/ docs/build/
nifty5/operators/field_zero_padder.py
View file @
215fcdff
...
...
@@ -25,6 +25,29 @@ from .linear_operator import LinearOperator
class
FieldZeroPadder
(
LinearOperator
):
"""Operator which applies zero-padding to one of the subdomains of its
input field
Parameters
----------
domain : Domain, DomainTuple or tuple of Domain
The operator's input domain.
new_shape : list or tuple of int
The new dimensions of the subdomain which is zero-padded.
No entry must be smaller than the corresponding dimension in the
operator's domain.
space : int
The index of the subdomain to be zero-padded. If None, it is set to 0
if domain contains exactly one space. domain[space] must be an RGSpace.
central : bool
If `False`, padding is performed at the end of the domain axes,
otherwise in the middle.
Notes
-----
When doing central padding on an axis with an even length, the "central"
entry should in principle be split up; this is currently not done.
"""
def
__init__
(
self
,
domain
,
new_shape
,
space
=
0
,
central
=
False
):
self
.
_domain
=
DomainTuple
.
make
(
domain
)
self
.
_space
=
utilities
.
infer_space
(
self
.
_domain
,
space
)
...
...
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