Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
do note validate x,y space coordinates specifically.

Co-authored-by: Chang Huan Lo <[email protected]>
  • Loading branch information
niksirbi and lochhh authored Sep 16, 2024
1 parent 55c40ab commit a581067
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions movement/analysis/kinematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def compute_displacement(data: xr.DataArray) -> xr.DataArray:
height per bounding box, between consecutive time points.
"""
validate_dims_coords(data, {"time": [], "space": ["x", "y"]})
validate_dims_coords(data, {"time": [], "space": []})
result = data.diff(dim="time")
result = result.reindex(data.coords, fill_value=0)
return result
Expand Down Expand Up @@ -154,7 +154,7 @@ def _compute_approximate_time_derivative(
)
if order <= 0:
raise log_error(ValueError, "Order must be a positive integer.")
validate_dims_coords(data, {"time": [], "space": ["x", "y"]})
validate_dims_coords(data, {"time": [], "space": []})
result = data
for _ in range(order):
result = result.differentiate("time")
Expand Down

0 comments on commit a581067

Please sign in to comment.