style: black format normalizer.py and test_normalizer.py

This commit is contained in:
pyr0ball 2026-04-26 20:05:54 -07:00
parent 460530bb03
commit 5a4917d455
2 changed files with 7 additions and 4 deletions

View file

@ -4,6 +4,7 @@ Landmark normalization for MediaPipe hand landmarks.
Converts raw (21, 3) landmark array into a 63-element translation- and
scale-invariant feature vector suitable for gesture classifiers.
"""
import numpy as np

View file

@ -32,7 +32,9 @@ def test_translation_invariance():
def test_scale_invariance():
pts_small = _synthetic_hand(scale=0.5)
pts_large = _synthetic_hand(scale=2.0)
np.testing.assert_allclose(normalize_hand(pts_small), normalize_hand(pts_large), atol=1e-5)
np.testing.assert_allclose(
normalize_hand(pts_small), normalize_hand(pts_large), atol=1e-5
)
def test_zero_scale_does_not_crash():