Skip to content

Commit

Permalink
make mypy happy with numpy typing
Browse files Browse the repository at this point in the history
  • Loading branch information
niksirbi committed Dec 18, 2024
1 parent cfeaca8 commit 3b24d6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions movement/io/nwb.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,10 @@ def _ds_from_pose_estimation_series(
position_array = np.asarray(pose_estimation_series.data)

# extract confidence data (n_time,)
if getattr(pose_estimation_series, "confidence", None) is None:
confidence_array = np.full(position_array.shape[0], np.nan)
else:
if getattr(pose_estimation_series, "confidence", None) is not None:
confidence_array = np.asarray(pose_estimation_series.confidence)
else:
confidence_array = np.full(position_array.shape[0], np.nan)

Check warning on line 333 in movement/io/nwb.py

View check run for this annotation

Codecov / codecov/patch

movement/io/nwb.py#L333

Added line #L333 was not covered by tests

# Compute fps from the time differences between timestamps
fps = np.nanmedian(1 / np.diff(pose_estimation_series.timestamps))
Expand Down

0 comments on commit 3b24d6d

Please sign in to comment.