Skip to content

Commit

Permalink
Merge branch 'main' into api_stability
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuehlbauer authored Jan 30, 2025
2 parents b351e5d + 97a4a71 commit bb7fe2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb7fe2c

Please sign in to comment.