diff --git a/src/visions/backends/shared/nan_handling.py b/src/visions/backends/shared/nan_handling.py index eaccdf37..15d6050d 100644 --- a/src/visions/backends/shared/nan_handling.py +++ b/src/visions/backends/shared/nan_handling.py @@ -45,10 +45,8 @@ def is_missing(x): else: return False - nb.extending.overload(is_missing)(is_missing) - @nb.jit def hasna(x: np.ndarray) -> bool: for item in x: diff --git a/src/visions/dtypes/boolean.py b/src/visions/dtypes/boolean.py index 5051bd07..508b2065 100644 --- a/src/visions/dtypes/boolean.py +++ b/src/visions/dtypes/boolean.py @@ -197,7 +197,7 @@ def coerce_to_array(values, dtype, mask=None, copy=False): values = np.array(values, dtype=int, copy=copy) elif not ( - is_integer_dtype(values) or is_float_dtype(values) or is_bool_dtype(values) + is_integer_dtype(values) or is_float_dtype(values) or is_bool_dtype(values) ): raise TypeError(f"{values.dtype} cannot be converted to an IntegerDtype") @@ -302,9 +302,9 @@ def dtype(self): def __init__(self, values, mask, copy=False): if not ( - isinstance(values, np.ndarray) - and is_integer_dtype(values.dtype) - or is_bool_dtype(values.dtype) + isinstance(values, np.ndarray) + and is_integer_dtype(values.dtype) + or is_bool_dtype(values.dtype) ): raise TypeError( "values should be integer numpy array. Use " @@ -677,7 +677,7 @@ def _maybe_mask_result(self, result, mask, other, op_name): # a float result # or our op is a divide if (is_float_dtype(other) or is_float(other)) or ( - op_name in ["rtruediv", "truediv"] + op_name in ["rtruediv", "truediv"] ): result[mask] = np.nan return result diff --git a/src/visions/test/series_sparse.py b/src/visions/test/series_sparse.py index 5a94238e..71907622 100644 --- a/src/visions/test/series_sparse.py +++ b/src/visions/test/series_sparse.py @@ -6,7 +6,7 @@ from visions.backends.pandas.test_utils import pandas_version not_pandas_1_0_5 = not ( - (pandas_version[0] == 1) and (pandas_version[1] == 0) and (pandas_version[2] == 5) + (pandas_version[0] == 1) and (pandas_version[1] == 0) and (pandas_version[2] == 5) )