Import fails with new numpy/uv install TypeClass error in coordinates #8

Open
opened 2026-09-21 15:33:48 +00:00 by markusro · 0 comments
Owner

TypeError: typealias() takes exactly 2 positional arguments (3 given)

This is caused by:

class CoordinateFrame(NDArray): # ← not allowed

numpy.typing.NDArray is a type alias for annotation purposes only, not a real class you can subclass

Workaround:
Use numpy below version 2.3
uv add "numpy>=2,<2.3"

Permanent fix:
subclass ndarray

class CoordinateFrame(np.ndarray):

`TypeError: typealias() takes exactly 2 positional arguments (3 given)` This is caused by: `class CoordinateFrame(NDArray): # ← not allowed` `numpy.typing.NDArray` is a type alias for annotation purposes only, not a real class you can subclass Workaround: Use numpy below version 2.3 `uv add "numpy>=2,<2.3"` Permanent fix: subclass ndarray `class CoordinateFrame(np.ndarray):`
Sign in to join this conversation.