Skip to content

Evenly sampled coords don't retain step when squished #567

@d-chambers

Description

@d-chambers

Description

Evenly sampled coordinates should retain step even with length of 1, for example from a patch.select.

Example

import dascore as dc

patch = dc.get_example_patch()

sub_patch = patch.select(time=1, samples=1)

time = sub_patch.get_coord("time")

assert time.step is not None

Expected behavior

The above test should pass, meaning the time coordinate, although of length 1, should retain its step.

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