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
5c69c519
Commit
5c69c519
authored
Nov 29, 2018
by
Reimar H Leike
Browse files
linear interpolation is now including all boundaries
parent
f97a9502
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/linear_interpolation.py
View file @
5c69c519
...
...
@@ -55,6 +55,10 @@ class LinearInterpolator(LinearOperator):
pos
=
positions
/
dist
excess
=
pos
-
pos
.
astype
(
int64
)
pos
=
pos
.
astype
(
int64
)
mask
=
(
excess
==
0.
)
&
(
pos
!=
0
)
pos
[
mask
]
-=
1
excess
[
mask
]
+=
1
del
mask
data
=
zeros
((
len
(
mg
[
0
]),
N_points
))
ii
=
zeros
((
len
(
mg
[
0
]),
N_points
),
dtype
=
int64
)
jj
=
zeros
((
len
(
mg
[
0
]),
N_points
),
dtype
=
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