diff --git a/spectral_cube/spectral_cube.py b/spectral_cube/spectral_cube.py index a610adce..704d4845 100644 --- a/spectral_cube/spectral_cube.py +++ b/spectral_cube/spectral_cube.py @@ -1058,7 +1058,7 @@ def apply_function(self, function, axis=None, weights=None, unit=None, # allocate memory for output array # check dtype first (for argmax/argmin) - result = function(np.arange(3, dtype=self._data.dtype, **kwargs)) + result = function(np.arange(3, dtype=self._data.dtype), **kwargs) if 'int' in str(result.dtype): out = np.zeros([nz, nx, ny], dtype=dtype) else: