diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index 74f90ce9eea..36cc76cbf8d 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -9141,7 +9141,7 @@ def polyfit( lhs = np.vander(x, order) if rcond is None: - rcond = x.shape[0] * np.finfo(x.dtype).eps # type: ignore[assignment] + rcond = x.shape[0] * np.finfo(x.dtype).eps # Weights: if w is not None: diff --git a/xarray/core/dtypes.py b/xarray/core/dtypes.py index 362cd78c689..96f660039b5 100644 --- a/xarray/core/dtypes.py +++ b/xarray/core/dtypes.py @@ -62,7 +62,7 @@ def maybe_promote(dtype: np.dtype) -> tuple[np.dtype, Any]: # N.B. these casting rules should match pandas dtype_: np.typing.DTypeLike fill_value: Any - if HAS_STRING_DTYPE and np.issubdtype(dtype, np.dtypes.StringDType()): # type: ignore[attr-defined] + if HAS_STRING_DTYPE and np.issubdtype(dtype, np.dtypes.StringDType()): # for now, we always promote string dtypes to object for consistency with existing behavior # TODO: refactor this once we have a better way to handle numpy vlen-string dtypes dtype_ = object pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy