From c91b2e9d52f94afcf0a4e624114e334532bb93f5 Mon Sep 17 00:00:00 2001 From: Martin Reinecke <martin@mpa-garching.mpg.de> Date: Thu, 16 Nov 2017 14:08:56 +0100 Subject: [PATCH] small fixes --- nifty/plotting/plot.py | 3 +-- nifty/utilities.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/nifty/plotting/plot.py b/nifty/plotting/plot.py index ba618339d..d0a9921eb 100644 --- a/nifty/plotting/plot.py +++ b/nifty/plotting/plot.py @@ -16,8 +16,7 @@ import os def _mollweide_helper(xsize): xsize = int(xsize) ysize = xsize//2 - res = np.full(shape=(ysize, xsize), fill_value=np.nan, - dtype=np.float64) + res = np.full(shape=(ysize, xsize), fill_value=np.nan, dtype=np.float64) xc = (xsize-1)*0.5 yc = (ysize-1)*0.5 u, v = np.meshgrid(np.arange(xsize), np.arange(ysize)) diff --git a/nifty/utilities.py b/nifty/utilities.py index 5674143c7..7b5cbcfe7 100644 --- a/nifty/utilities.py +++ b/nifty/utilities.py @@ -143,7 +143,7 @@ def _fill_upper_half(tmp, res, axes): def _fill_array(tmp, res, axes): if axes is None: - axes = range(tmp.ndim) + axes = tuple(range(tmp.ndim)) lastaxis = axes[-1] ntmplast = tmp.shape[lastaxis] slice1 = [slice(None)]*lastaxis + [slice(0, ntmplast)] -- GitLab