Skip to content

Conversation

@aljazkonec1
Copy link
Contributor

Purpose

Going from numpy 2.3 to numpy 2.4 the access to 1 dim array with single value was changed so creating a tuple like ([float], [float]) would keep it as such even if the tuple is defined as tuple(float, float). This would cause a crash :

terminate called after throwing an instance of 'pybind11::error_already_set'
  what():  TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. depthai.Point2f()
    2. depthai.Point2f(x: float, y: float)
    3. depthai.Point2f(x: float, y: float, normalized: bool)

Invoked with: array([0.89453125]), array([0.]), True
` ``

## Dependencies & Potential Impact
<!-- Any affected services, breaking changes, or risks? Replace the default or keep if not applicable (explain why).-->
There is potentially other broken examples. A more stable solution would be to remove the `Point = Tuple[float, float]` from [depthai-nodes](https://github.com/luxonis/depthai-nodes/blob/e7c27c47ad3005ef2b1042f3d2fae80c832b6224/depthai_nodes/utils/annotation_helper.py#L13) as that was the way the bug got into annotations.

@klemen1999 klemen1999 added the testable PR is ready to be tested label Jan 15, 2026
@klemen1999
Copy link
Collaborator

How about collision-avoidance? That one also failed and might need a similar fix.

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

Labels

testable PR is ready to be tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants