-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
DASCore's coordinates should behave like arrays for arithmetic purposes, but they currently do not.
Example
coord = dc.get_coord(data=[1,2,3,])
coord + 1 # Raises a TypeErrorExpected behavior
Coords should act just like arrays in these respects, although any arithmetic operation should return a coordinate (which preserves units) not an array. For example,
import dascore as dc
coord =dc.get_coord([1,2,3], units='m')
coord_2 = coord + 1
assert isinstance(coord, dc.BaseCoordinate)
assert coord.units == coord_2.unitsThis should also be tested on a variety of array functions (plus, minus, np.linalg.norm, np.sqrt, etc).
Versions
- OS [e.g. Ubuntu 20.04]:
- DASCore Version [e.g. 0.0.5]:
- Python Version [e.g. 3.10]:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working