home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 455605431

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
455605431 MDU6SXNzdWU0NTU2MDU0MzE= 3020 Can we clarify decode_cf option of open_dataset? 5948670 open 0     2 2019-06-13T08:32:12Z 2019-11-16T20:45:19Z   CONTRIBUTOR      

Dea all,

I encountered a small unforeseen bug using the decode_cf of open_dataset. By only reading the doc string, I was not aware of the complete meaning of this parameter. Especially, that it overwrites other options.

Example: ds = xarray.open_dataset(file_name, mask_and_scale=True, decode_cf=False)

The result is an unmasked and not sclaed dataset. decode_cf simply overwrites other options. See the code: https://github.com/pydata/xarray/blob/stable/xarray/backends/api.py#L308-L312

A simple solution would be to explain, that decode_cf sets mask_and_scale, decode_times, concat_characters, and decode_coords to False. But probably it would be more convenient to detect option conflicts like in my example and raise a ValueError.

What do you think? Do you prefer any of these options? I could write the little PR.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3020/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 issue

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 1.452ms · About: xarray-datasette