Skip to content

get_element_instances and get_centroids should not (?) return zero element #614

Description

@giovp

if isinstance(element, DataArray):
# get unique labels value (including 0 if present)
instances = da.unique(element.data).compute()

I think that is counter-intuitive to return zero, since it's not an instance. I would maybe consider to add an optional argument return_zero: bool = False wdyt?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions