Skip to content

correct_invalid_trajectories: Replace Python loops with Numpy vectorized operations where possible #519

@schroedtert

Description

@schroedtert

Replace the for-loops in trajectory_projector with Numpy array operations. Instead of processing one point at a time, extract all x and y coordinates into Numpy arrays using numpy.asarray, process them in batch operations, and write results back using Pandas indexing. Look for other loops that iterate over trajectory points and apply similar transformations. Use numpy.hstack to combine coordinate arrays when needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    code qualityAnything related to increasing the code quality (e.g., refactoring, design patterns, ...)pre-processingAnything related to pre-processing the data

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions