Skip to content

pybricks.tools: Fix crash when cross() args are wrong type. #377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dlech
Copy link
Member

@dlech dlech commented Aug 9, 2025

Add type checking to fix a crash if the arguments to cross() are not Matrix objects.

Add type checking to fix a crash if the arguments to `cross()` are not
`Matrix` objects.
@dlech dlech requested a review from laurensvalk August 9, 2025 17:25
@coveralls
Copy link

Coverage Status

coverage: 56.988% (-0.01%) from 56.998%
when pulling c3795f0 on dlech:fix-cross-crash
into 3b3c775 on pybricks:master.

@laurensvalk
Copy link
Member

Thanks for catching this.

If we're going to add a verbose error, we should probably say that arguments should be three dimensional vectors (3x1 or 1x3 Matrix), combining it with the existing check below.

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.

3 participants