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
Open sidebar
ift
NIFTy
Commits
f65415e7
Commit
f65415e7
authored
Feb 05, 2019
by
Reimar H Leike
Browse files
fixed that rounding would truncate instead of rounding downm
parent
9cdba817
Pipeline
#43340
passed with stages
in 8 minutes and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/linear_interpolation.py
View file @
f65415e7
...
...
@@ -75,8 +75,8 @@ class LinearInterpolator(LinearOperator):
# dimensions.
dist
=
np
.
array
(
dist
).
reshape
(
-
1
,
1
)
pos
=
sampling_points
/
dist
excess
=
pos
-
pos
.
astype
(
np
.
int64
)
pos
=
pos
.
astype
(
np
.
int64
)
excess
=
pos
-
np
.
floor
(
pos
)
pos
=
np
.
floor
(
pos
)
.
astype
(
np
.
int64
)
max_index
=
np
.
array
(
self
.
domain
.
shape
).
reshape
(
-
1
,
1
)
data
=
np
.
zeros
((
len
(
mg
[
0
]),
N_points
))
ii
=
np
.
zeros
((
len
(
mg
[
0
]),
N_points
),
dtype
=
np
.
int64
)
...
...
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