Skip to content

plan = -1 fails in SelafinAccessor #67

Description

@tomsail

The second line in the docs here fails:

ds_bottom = ds.selafin.get_dataset_as_2d(plan=0)   # bottom layer
ds_top = ds.selafin.get_dataset_as_2d(plan=-1)      # top layer

Simply because the following assertion:

assert 0 <= plan <= self._ds.sizes.get("plan") - 1

Didn't take into account negative plan values.
Taking the absolute value shoud fix it.

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