Skip to content

to_datetime64 and to_timedelta64 don't handle immutable arrays #575

@d-chambers

Description

@d-chambers

Description

to_datatime64 and to_timedelta64 don't handle mutable arrays. They raise a ValueError in trying to mask out NaN values.

Example

import dascore as dc
import numpy as np

 rand = np.random.RandomState(42)
 array = rand.random(100)
 array.setflags(write=False)

 time = dc.to_timedelta64(array)  # raises ValueError: assignment destination is read-only

Expected behavior

This should work fine.

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