Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 17, 2024
1 parent 455ebfd commit 3112efc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 5 additions & 1 deletion reciprocalspaceship/dtypes/integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@
from pandas.util._decorators import cache_readonly

from reciprocalspaceship.dtypes.base import MTZDtype
from reciprocalspaceship.dtypes.internals import BaseMaskedDtype, NumericArray, is_numeric_na
from reciprocalspaceship.dtypes.internals import (
BaseMaskedDtype,
NumericArray,
is_numeric_na,
)


class MTZInt32Dtype(MTZDtype):
Expand Down
5 changes: 2 additions & 3 deletions reciprocalspaceship/dtypes/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@

import numbers
import warnings
from typing import Any, Sequence
from functools import wraps
from typing import Any, Sequence

import numpy as np
from pandas._libs import lib
Expand Down Expand Up @@ -1359,8 +1359,7 @@ def round(self: T, decimals: int = 0, *args, **kwargs) -> T:

@wraps(libmissing.is_numeric_na)
def is_numeric_na(values):
allowed_dtypes = ('float32', 'int32')
allowed_dtypes = ("float32", "int32")
if isinstance(values, np.ndarray) and values.dtype in allowed_dtypes:
return np.isnan(values)
return libmissing.is_numeric_na(values)

0 comments on commit 3112efc

Please sign in to comment.