Skip to content

Better error message for transpose of missing dims #570

@d-chambers

Description

@d-chambers

Description

Currently, patch.transpose gives a very cryptic error if one tries to transpose non-existent dimensions. It should give a clear error message.

Example

import dascore as dc
patch = dc.get_example_patch()

patch.transpose("time", 'not_a_dim")   # Raises ValueError: list.remove(x): x not in list

Expected behavior

A clear ParameterError stating which dimension is not in the patch should be issued.

Versions

  • OS [e.g. Ubuntu 20.04]:
  • DASCore Version [e.g. 0.0.5]:
  • Python Version [e.g. 3.10]:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions