removed openpilot.common.numpy_fast #34331 #34357
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.
Description
This pull request removes the numpy_fast.py utility and its references across the OpenPilot codebase and opendbc repository. The numpy_fast optimization is no longer necessary in the post-comma two world, as modern numpy functions (np.clip, np.interp, np.mean) offer comparable performance and maintainability.
Changes made:
Removed the numpy_fast.py file from the common directory.
Replaced calls to clip, interp, and mean in dependent files with equivalent numpy functions (np.clip, np.interp, np.mean).
Updated the opendbc repository to ensure no lingering dependencies on numpy_fast.
Verification
Verified all impacted files by replacing references to numpy_fast functions with numpy's built-in alternatives and ensured compatibility.
Additional Notes
Pending Tasks: Unit tests and manual testing in critical modules were not performed as part of this change. Further validation is recommended to ensure no regressions or unexpected behavior.
Removed all remaining references to numpy_fast from the opendbc submodule.