issues: 757998857
This data as json
| id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 757998857 | MDU6SXNzdWU3NTc5OTg4NTc= | 4655 | ComplexWarning: Casting complex values to real discards the imaginary part | 12728415 | closed | 0 | 2 | 2020-12-06T19:09:26Z | 2023-03-29T16:02:01Z | 2023-03-29T16:01:54Z | NONE | xarray version 0.16.2/ Python 3.8.5 When reading a dataset containing complex variables using Dataset.open_zarr method the following warning appears:
__/home/.../python3.8/site-packages/xarray/coding/variables.py:218: ComplexWarning: Casting complex values to real discards the imaginary part_
And the imaginary part is effectively discarded which is not what I expected.
After a slightly more in-depth analysis I came across the function (xarray/coding/variables.py:226)
``` and it is working as I expected. If there is a good reason to keep things as they are, can you explain me how to deal with complex data without creating a new variable? Thank you for your great job, xarray is awesome. |
{
"url": "https://api.github.com/repos/pydata/xarray/issues/4655/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |