Skip to content
GitLab
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
24aad6fe
Commit
24aad6fe
authored
Nov 29, 2018
by
Philipp Arras
Browse files
Do not support UnstructuredDomains anymore
parent
8a83b8da
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/linear_interpolation.py
View file @
24aad6fe
...
...
@@ -55,13 +55,11 @@ class LinearInterpolator(LinearOperator):
mg
=
array
(
list
(
map
(
ravel
,
mg
)))
dist
=
[]
for
dom
in
self
.
domain
:
if
isinstance
(
dom
,
UnstructuredDomain
):
dist
.
append
([
1
]
*
len
(
dom
.
shape
))
elif
isinstance
(
dom
,
RGSpace
):
if
isinstance
(
dom
,
RGSpace
):
dist
.
append
(
list
(
dom
.
distances
))
else
:
raise
TypeError
dist
=
array
(
dist
).
flatten
().
reshape
((
-
1
,
1
))
dist
=
array
(
dist
).
reshape
((
-
1
,
1
))
pos
=
positions
/
dist
excess
=
pos
-
pos
.
astype
(
int64
)
pos
=
pos
.
astype
(
int64
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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