Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
keflavich committed Oct 13, 2024
1 parent 63dfef9 commit 25127dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spectral_cube/spectral_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ def apply_function(self, function, axis=None, weights=None, unit=None,
# check dtype first (for argmax/argmin)
result = function(np.arange(3, dtype=self._data.dtype), **kwargs)
if 'int' in str(result.dtype):
out = np.zeros([nz, nx, ny], dtype=dtype)
out = np.zeros([nz, nx, ny], dtype=result.dtype)
else:
out = np.empty([nz, nx, ny]) * np.nan

Expand Down

0 comments on commit 25127dc

Please sign in to comment.