10000 don't use `issubdtype` to check for integer dtypes in `polyval` by Ravenin7 · Pull Request #7619 · pydata/xarray · GitHub
[go: up one dir, main page]

Skip to content

don't use issubdtype to check for integer dtypes in polyval #7619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixed unneeded ValueError
  • Loading branch information
Ravenin7 committed Mar 13, 2023
commit ecace84530eb8e2ff1d67a70a57ee7b0e85294d5
2 changes: 1 addition & 1 deletion xarray/core/computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@ def polyval(
raise ValueError(
f"Dimension `{degree_dim}` should be a coordinate variable with labels."
)
if not np.issubdtype(coeffs[degree_dim].dtype, int):
if coeffs[degree_dim].dtype.kind not in 'i':
raise ValueError(
f"Dimension `{degree_dim}` should be of integer dtype. Received {coeffs[degree_dim].dtype} instead."
)
Expand Down
0