Vectorize GPX backflow computations #38
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
GPXPoint.backflowwith NumPy vectorisationffmpegis missingextra_outtuples in CLI helperTesting
pytest -qimport sys, pandas as pd, geopy
from datetime import datetime, timezone
sys.path.append('src')
from ssoss.motion_road_object import GPXPoint
from ssoss.static_road_object import Intersection
N=100000
ints=[Intersection(i,("A","B"),geopy.Point(0,i*1e-6),spd=(25,25,25,25),bearing=(0,90,180,270)) for i in range(N)]
df=pd.DataFrame({'intersection_obj':ints})
pt=GPXPoint(0, datetime.now(timezone.utc).isoformat(), (0.0,0.0), 10)
import timeit
print(timeit.timeit(lambda: pt.backflow(df,'intersection'), number=1))
PY
https://chatgpt.com/codex/tasks/task_e_6849f7a52208832ba62394286f70d18c