Repository navigation
Conversation
Added support for stacked numpy arrays in baseposelist.py.
… error Added support for SE3 constructor with (N, 4, 4) NumPy array.
Add unit test for SE3 constructor with stacked array input.
RoboX2020
requested review from
jbarry-bdai,
petercorke and
taughz
as code owners
October 10, 2026 22:51
19 tasks
This branch has not been deployed
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.
Closes #236.
SE3(arr)with an(N, 4, 4)array raised "bad argument to constructor", and withcheck=Falseit returned a malformed object (length 1, but.Aof shape(N, 4, 4)).Changes:
BasePoseList.arghandler: anndarraywith shape(N, r, c), where(r, c)is the shape of one value of the class, is now taken as N values, the same asSE3(list(arr)). Each matrix still goes through the class's validity check whencheck=True. This covers the matrix classesSE3,SO3,SE2andSO2.check=False, an array of the wrong shape is now rejected instead of silently stored. Only the value checks are skipped.SE3error message now lists the accepted forms, and the constructor docstring documents the new form.Test:
test_constructor_stacked_arraycoversSE3andSO3from a stacked array with bothcheckvalues, the empty(0, 4, 4)case, rejection of invalid matrices withcheck=Trueand of a wrong-sized stack with either value. It fails onmasterand passes with this change.Run locally (Python 3.11):
pytest testsgives 348 passed, 3 skipped. black 23.10.0 is clean. Not run: the docs build and other Python versions.