Skip to content

domain Option Silently Ignored #5

@rafatoshio

Description

@rafatoshio

Hi,

I noticed an issue in processing_data.py, specifically in the open_dataset.image() function. There is an option called domain, which defaults to None. However, on line 461, the code only checks if domain is an instance of a list or np.ndarray. If domain is any other type, it is silently ignored without raising an error, which can be misleading for users.

I have two suggestions to address this issue:

1 - Update line 461 to check if domain is not None:
if domain is not None

2 - Alternatively, check if domain is an iterable:

from collections.abc import Iterable
if isinstance(domain, Iterable)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions