Commit c14efdc6 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'minor_fixups' into 'NIFTy_5'

Minor fixups

See merge request ift/nifty-dev!170
parents 09f38780 a5aba5ae
...@@ -5,7 +5,7 @@ RUN apt-get update && apt-get install -y \ ...@@ -5,7 +5,7 @@ RUN apt-get update && apt-get install -y \
git \ git \
# Packages needed for NIFTy # Packages needed for NIFTy
libfftw3-dev \ libfftw3-dev \
python3 python3-pip python3-dev python3-future python3-scipy cython3 \ python3 python3-pip python3-dev python3-scipy \
# Documentation build dependencies # Documentation build dependencies
python3-sphinx python3-sphinx-rtd-theme \ python3-sphinx python3-sphinx-rtd-theme \
# Testing dependencies # Testing dependencies
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik. # NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
from functools import reduce from functools import reduce
from operator import mul from operator import add
import numpy as np import numpy as np
from scipy.sparse import coo_matrix from scipy.sparse import coo_matrix
...@@ -53,7 +53,7 @@ class LinearInterpolator(LinearOperator): ...@@ -53,7 +53,7 @@ class LinearInterpolator(LinearOperator):
dims = [len(dom.shape) for dom in self.domain] dims = [len(dom.shape) for dom in self.domain]
# FIXME This needs to be removed as soon as the bug below is fixed. # 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( raise TypeError(
'This is a bug. Please extend LinearInterpolators functionality!' 'This is a bug. Please extend LinearInterpolators functionality!'
) )
...@@ -62,7 +62,7 @@ class LinearInterpolator(LinearOperator): ...@@ -62,7 +62,7 @@ class LinearInterpolator(LinearOperator):
if not (isinstance(sampling_points, np.ndarray) and len(shp) == 2): if not (isinstance(sampling_points, np.ndarray) and len(shp) == 2):
raise TypeError raise TypeError
n_dim, n_points = shp n_dim, n_points = shp
if not n_dim == reduce(mul, dims): if n_dim != reduce(add, dims):
raise TypeError raise TypeError
self._target = makeDomain(UnstructuredDomain(n_points)) self._target = makeDomain(UnstructuredDomain(n_points))
self._capability = self.TIMES | self.ADJOINT_TIMES self._capability = self.TIMES | self.ADJOINT_TIMES
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment