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
c14efdc6
Commit
c14efdc6
authored
Jan 15, 2019
by
Martin Reinecke
Browse files
Merge branch 'minor_fixups' into 'NIFTy_5'
Minor fixups See merge request ift/nifty-dev!170
parents
09f38780
a5aba5ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
c14efdc6
...
...
@@ -5,7 +5,7 @@ RUN apt-get update && apt-get install -y \
git \
# Packages needed for NIFTy
libfftw3-dev \
python3 python3-pip python3-dev python3-
future python3-scipy cython3
\
python3 python3-pip python3-dev python3-
scipy
\
# Documentation build dependencies
python3-sphinx python3-sphinx-rtd-theme \
# Testing dependencies
...
...
nifty5/operators/linear_interpolation.py
View file @
c14efdc6
...
...
@@ -16,7 +16,7 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
from
functools
import
reduce
from
operator
import
mul
from
operator
import
add
import
numpy
as
np
from
scipy.sparse
import
coo_matrix
...
...
@@ -53,7 +53,7 @@ class LinearInterpolator(LinearOperator):
dims
=
[
len
(
dom
.
shape
)
for
dom
in
self
.
domain
]
# FIXME This needs to be removed as soon as the bug below is fixed.
if
not
dims
.
count
(
dims
[
0
])
=
=
len
(
dims
):
if
dims
.
count
(
dims
[
0
])
!
=
len
(
dims
):
raise
TypeError
(
'This is a bug. Please extend LinearInterpolators functionality!'
)
...
...
@@ -62,7 +62,7 @@ class LinearInterpolator(LinearOperator):
if
not
(
isinstance
(
sampling_points
,
np
.
ndarray
)
and
len
(
shp
)
==
2
):
raise
TypeError
n_dim
,
n_points
=
shp
if
not
n_dim
=
=
reduce
(
mul
,
dims
):
if
n_dim
!
=
reduce
(
add
,
dims
):
raise
TypeError
self
.
_target
=
makeDomain
(
UnstructuredDomain
(
n_points
))
self
.
_capability
=
self
.
TIMES
|
self
.
ADJOINT_TIMES
...
...
Write
Preview
Supports
Markdown
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