Skip to content

fix(base): raise ValueError on invalid matrix shape in trinterp - #294

Open
davrens101 wants to merge 1 commit into
rai-opensource:masterfrom
davrens101:fix/trinterp-raise-valueerror
Open

davrens101 wants to merge 1 commit into
rai-opensource:masterfrom
davrens101:fix/trinterp-raise-valueerror

Conversation

@davrens101

Copy link
Copy Markdown

trinterp returns a ValueError instance instead of raising it when end is neither 3x3 nor 4x4, so callers never see the error (the docstring says it raises). trinterp2 already uses raise.

>>> trinterp(None, np.zeros((2, 2)), 0.5)
ValueError('Argument must be SO(3) or SE(3)')   # returned, not raised

After the change it raises. Added a test for 2x2 and 5x5 input; tests/base/test_transforms3d.py passes.

AI assistance: developed with an AI coding assistant; I reproduced the bug and ran the tests locally.

Signed-off-by: Davis Rens <166565828+davrens101@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant