Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 10, 2024
1 parent c479298 commit f390e0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
18 changes: 8 additions & 10 deletions movement/io/load_poses.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,9 +758,7 @@ def from_anipose_style_df(
confidence_array = np.zeros((n_frames, n_keypoints, 1))
for i, kp in enumerate(keypoint_names):
for j, coord in enumerate(["x", "y", "z"]):
position_array[:, j, i, 0] = df[
f"{kp}_{coord}"
]
position_array[:, j, i, 0] = df[f"{kp}_{coord}"]
confidence_array[:, i, 0] = df[f"{kp}_score"]

individual_names = [individual_name]
Expand Down Expand Up @@ -808,13 +806,13 @@ def from_anipose_file(
"""
file = ValidFile(
file_path,
expected_permission="r",
expected_suffix=[".csv"],
)
file_path,
expected_permission="r",
expected_suffix=[".csv"],
)
file = ValidAniposeCSV(file.path)
anipose_triangulation_df = pd.read_csv(file.path)

return from_anipose_style_df(anipose_triangulation_df,
fps=fps,
individual_name=individual_name)
return from_anipose_style_df(
anipose_triangulation_df, fps=fps, individual_name=individual_name
)
3 changes: 0 additions & 3 deletions tests/test_unit/test_load_poses.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,3 @@ def test_load_from_anipose_file():
"r-edge",
"r-middle",
]



0 comments on commit f390e0b

Please sign in to comment.