diff --git a/changelog/218.bugfix.rst b/changelog/218.bugfix.rst new file mode 100644 index 000000000..ceb40318e --- /dev/null +++ b/changelog/218.bugfix.rst @@ -0,0 +1 @@ +Fix crashing bug when an NDCube axis after the first is sliced with a numpy.int64. diff --git a/ndcube/utils/wcs.py b/ndcube/utils/wcs.py index 981b8ca0c..bcdd60cc9 100644 --- a/ndcube/utils/wcs.py +++ b/ndcube/utils/wcs.py @@ -207,7 +207,7 @@ def _wcs_slicer(wcs, missing_axes, item): item_ = _slice_list(item_checked) new_wcs = wcs.slice(item_) for i, it in enumerate(item_checked): - if isinstance(it, int): + if isinstance(it, (int, np.int64, np.int32)): missing_axes[i] = True else: raise NotImplementedError("Slicing FITS-WCS by {} not supported.".format(type(item)))