Fix 3 bugs in EOT shape database#1574
Merged
FlorianPfaff merged 1 commit intomainfrom Mar 31, 2026
Merged
Conversation
…ty polygon dimension, and @classmethod on setUp Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/27f787c9-722d-4cc0-93e6-0ff0f3f8e4f6 Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
FlorianPfaff
March 31, 2026 12:27
View session
Contributor
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Three bugs in
eot_shape_database.pyand its test file — incorrect return type, array dimension mismatch, and a misapplied decorator.Changes
sample_within()return type (eot_shape_database.py:58): Was returningnp.array(points)— an object array of ShapelyPointinstances. Fixed tonp.array([(p.x, p.y) for p in points]), matching the behavior of the already-correctsample_on_boundary().Dimension mismatch in
compute_visibility_polygon()(eot_shape_database.py:108):np.array(point.coords)yields shape(1, 2)not(2,). Subtraction with a(2,)vertex silently broadcast, producing a(1, 2)direction vector passed toPoint(...)as the far-away point.@classmethodonsetUp()(test_eot_shape_database.py:59):setUpis a per-instance lifecycle method; the decorator caused it to receive the class asself, settingstarfishas a class attribute and silently breaking test isolation. Removed the decorator.