Skip to content

Commit

Permalink
Changed to "is" when comparing types
Browse files Browse the repository at this point in the history
  • Loading branch information
seanlaw committed Dec 27, 2024
1 parent 3165d1c commit 4416873
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stumpy/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,11 @@ def check_dtype(a, dtype=np.float64): # pragma: no cover
TypeError
If the array type does not match `dtype`
"""
if dtype == int:
if dtype is int:
dtype = np.int64
if dtype == float:
if dtype is float:
dtype = np.float64
if dtype == bool:
if dtype is bool:
dtype = np.bool_
if not np.issubdtype(a.dtype, dtype):
msg = f"{dtype} dtype expected but found {a.dtype} in input array\n"
Expand Down

0 comments on commit 4416873

Please sign in to comment.