Skip to content

Patch sample select doesn't work with numpy ints. #568

@d-chambers

Description

@d-chambers

Description

The patch.select method allows one to select a single sample when samples==True in which case the argument must be an int. However, when using a numpy int the method raises an error.

Example

import dascore as dc
import numpy as np

patch = dc.get_example_patch()

sub1 = patch.select(time=0, samples=True)  # works fine
sub2 = patch.select(time=np.int64(0), samples=True)  # raises AssertionError

Expected behavior

Both python ints and numpy ints should work.

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