rustat-python-api 0.6.0__tar.gz → 0.6.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rustat-python-api-0.6.0/rustat_python_api.egg-info → rustat-python-api-0.6.1}/PKG-INFO +1 -1
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/rustat_python_api/pitch_control.py +15 -2
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1/rustat_python_api.egg-info}/PKG-INFO +1 -1
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/setup.py +1 -1
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/LICENSE +0 -0
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/README.md +0 -0
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/pyproject.toml +0 -0
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/rustat_python_api/__init__.py +0 -0
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/rustat_python_api/config.py +0 -0
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/rustat_python_api/models_api.py +0 -0
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/rustat_python_api/parser.py +0 -0
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/rustat_python_api/processing.py +0 -0
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/rustat_python_api/urls.py +0 -0
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/rustat_python_api.egg-info/SOURCES.txt +0 -0
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/rustat_python_api.egg-info/dependency_links.txt +0 -0
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/rustat_python_api.egg-info/requires.txt +0 -0
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/rustat_python_api.egg-info/top_level.txt +0 -0
- {rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/setup.cfg +0 -0
|
@@ -398,11 +398,24 @@ class PitchControl:
|
|
|
398
398
|
@staticmethod
|
|
399
399
|
def _stack_team_frames(players: list[np.ndarray], frames: np.ndarray, device: str, dtype: torch.dtype):
|
|
400
400
|
"""Stack positions for given frames into torch tensors (pos_t, pos_tp1)."""
|
|
401
|
+
# Ensure every player's trajectory is long enough; if not, pad by repeating
|
|
402
|
+
# the last available coordinate so that indexing `frames` and `frames+1` is safe.
|
|
403
|
+
max_needed = frames[-1] + 1 # we access idx and idx+1
|
|
404
|
+
|
|
405
|
+
padded = []
|
|
406
|
+
for p in players:
|
|
407
|
+
if len(p) <= max_needed:
|
|
408
|
+
pad_len = max_needed + 1 - len(p)
|
|
409
|
+
if pad_len > 0:
|
|
410
|
+
last = p[-1][None, :]
|
|
411
|
+
p = np.vstack([p, np.repeat(last, pad_len, axis=0)])
|
|
412
|
+
padded.append(p)
|
|
413
|
+
|
|
401
414
|
pos_t = torch.tensor(
|
|
402
|
-
np.stack([p[frames] for p in
|
|
415
|
+
np.stack([p[frames] for p in padded], axis=1), device=device, dtype=dtype
|
|
403
416
|
) # (F,P,2)
|
|
404
417
|
pos_tp1 = torch.tensor(
|
|
405
|
-
np.stack([p[frames + 1] for p in
|
|
418
|
+
np.stack([p[frames + 1] for p in padded], axis=1), device=device, dtype=dtype
|
|
406
419
|
)
|
|
407
420
|
return pos_t, pos_tp1
|
|
408
421
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/rustat_python_api.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{rustat-python-api-0.6.0 → rustat-python-api-0.6.1}/rustat_python_api.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|