diff --git a/ndcube/ndcube.py b/ndcube/ndcube.py index f698634ba..445912c65 100644 --- a/ndcube/ndcube.py +++ b/ndcube/ndcube.py @@ -503,7 +503,7 @@ def crop_by_extra_coord(self, coord_name, min_coord_value, max_coord_value): result: `ndcube.NDCube` """ - if isinstance(coord_name, str): + if not isinstance(coord_name, str): raise TypeError("The API for this function has changed. " "Please give coord_name, min_coord_value, max_coord_value") extra_coord_dict = self.extra_coords[coord_name]