diff --git a/odl/discr/discr_utils.py b/odl/discr/discr_utils.py index 25eb08a8e38..4d8d855d60f 100644 --- a/odl/discr/discr_utils.py +++ b/odl/discr/discr_utils.py @@ -553,8 +553,9 @@ def __call__(self, x, out=None): Parameters ---------- - x : `meshgrid` or `numpy.ndarray` - Evaluation points of the interpolator + x : `meshgrid` (i.e., tuple of arrays) if `input_type` is meshgrid, + else `numpy.ndarray`. + Evaluation points of the interpolator. out : `numpy.ndarray`, optional Array to which the results are written. Needs to have correct shape according to input ``x``. @@ -565,7 +566,12 @@ def __call__(self, x, out=None): Interpolated values. If ``out`` was given, the returned object is a reference to it. """ - x = np.asarray(x) + if self.input_type == 'meshgrid': + # Given a meshgrid, the evaluation will be on a ragged array. + x = np.asarray(x, dtype=object) + else: + x = np.asarray(x) + ndim = len(self.coord_vecs) scalar_out = False diff --git a/odl/tomo/backends/skimage_radon.py b/odl/tomo/backends/skimage_radon.py index f4d609e3fd1..3e53ef8c6f9 100644 --- a/odl/tomo/backends/skimage_radon.py +++ b/odl/tomo/backends/skimage_radon.py @@ -152,13 +152,19 @@ def skimage_radon_back_projector(sinogram, geometry, vol_space, out=None): # Only do asserts here since these are backend functions assert out in vol_space + # scikit-image changed the name of this parameter in version 0.17 + if (skimage.__version__ < '0.17'): + filter_disable = {"filter": None} + else: + filter_disable = {"filter_name": None} + # Rotate back from (rows, cols) to (x, y), then back-project (no filter) backproj = iradon( skimage_sinogram.asarray().T, theta, output_size=vol_space.shape[0], - filter=None, circle=False, + **filter_disable ) out[:] = np.rot90(backproj, -1)