-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CLN: xarray tests #32943
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
CLN: xarray tests #32943
Conversation
`DeprecationWarning: The default dtype for empty Series will be 'object' instead of 'float64' in a future version. Specify a dtype explicitly to silence this warning.`
def test_to_xarray_index_types(self, indices): | ||
if isinstance(indices, pd.MultiIndex): | ||
pytest.skip("MultiIndex is tested separately") | ||
|
||
from xarray import DataArray | ||
|
||
s = Series(range(len(indices)), index=indices) | ||
s = Series(range(len(indices)), index=indices, dtype="float64") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this change needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To suppress the Deprecation warning
DeprecationWarning: The default dtype for empty Series will be 'object' instead of 'float64' in a future version. Specify a dtype explicitly to silence this warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the only place this occurs? I assume we are getting an empty container through from indices
I'd be surprised if this is the only case, so not sure doing as a one-off here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the only place this occurs? I assume we are getting an empty container through from indices
I'd be surprised if this is the only case, so not sure doing as a one-off here
@WillAyd This is the only case in this file that raises the deprecation warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can revert this change, not a deal breaker for me
LGTM |
def test_to_xarray_index_types(self, indices): | ||
if isinstance(indices, pd.MultiIndex): | ||
pytest.skip("MultiIndex is tested separately") | ||
|
||
from xarray import DataArray | ||
|
||
s = Series(range(len(indices)), index=indices) | ||
s = Series(range(len(indices)), index=indices, dtype="float64") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the only place this occurs? I assume we are getting an empty container through from indices
I'd be surprised if this is the only case, so not sure doing as a one-off here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @MomIsBestFriend lgtm ex @WillAyd comment.
Thanks @MomIsBestFriend |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff