Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
[MNT]: Add type stubs for proj3d.pyi to resolve inconsistent type ann…#30716
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,55 @@ | ||||||
| import numpy as np | ||||||
| from typing import Optional | ||||||
| from typing import Union | ||||||
| from matplotlib import _api | ||||||
| def world_transformation(xmin: int, xmax:int, | ||||||
| ymin: int, ymax: int, | ||||||
| zmin: int, zmax: int, pb_aspect=Optional[np.typing.ArrayLike]) -> np.ndarray: ... | ||||||
| def _rotation_about_vector(v: np.typing.ArrayLike, angle: float) -> np.ndarray: ... | ||||||
| def _view_axes(E: np.ndarray, R: np.ndarray, V: np.ndarray, roll: float) -> tuple[np.ndarray, np.ndarray, np.ndarray]: ... | ||||||
| def _view_transformation_uvw(u: np.ndarray, v: np.ndarray, w: np.ndarray, E:np.ndarray) -> np.ndarray: ... | ||||||
| def _persp_transformation(zfront: np.typing.ArrayLike, zback: np.typing.ArrayLike, focal_length: np.typing.ArrayLike) -> np.ndarray: ... | ||||||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Suggested change
| ||||||
| def _ortho_transformation(zfront, zback) -> np.ndarray: ... | ||||||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Suggested change
| ||||||
| def _proj_transform_vec(vec: np.typing.ArrayLike, M: np.typing.ArrayLike) -> tuple[float, float, float]: ... | ||||||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. The return type is not correct the three tuple elements are not simple floats. Likely ndarrays, but please recheck. | ||||||
| def _proj_transform_vectors(vecs: np.ndarray, M: np.ndarray) -> np.ndarray: ... | ||||||
| def _proj_transform_vec_clip(vec: np.typing.ArrayLike, M: np.ndarray, focal_length:np.typing.ArrayLike) -> tuple[np.ndarray, np.ndarray, np.ndarray]: ... | ||||||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Suggested change
Also the return type cannot be correct because it has 4 elements. Please fix this as well for the functions that propagate this return value. | ||||||
| def inv_transform(xs: np.typing.ArrayLike, ys: np.typing.ArrayLike, zs: np.typing.ArrayLike, invM: np.ndarray) -> tuple[float, float, float]: ... | ||||||
| def _vec_pad_ones(xs: np.typing.ArrayLike, ys: np.typing.ArrayLike, zs: Union[np.typing.ArrayLike, float] = 0) -> np.ndarray: ... | ||||||
| def proj_transform(xs: np.typing.ArrayLike, ys: np.typing.ArrayLike, zs: np.typing.ArrayLike, M:np.ndarray) -> tuple[float, float, float]: ... | ||||||
| @_api.deprecated("3.10") | ||||||
| def proj_transform_clip(xs: np.typing.ArrayLike, ys: np.typing.ArrayLike, zs: np.typing.ArrayLike, M:np.ndarray) -> tuple[np.ndarray, np.ndarray, np.ndarray]: ... | ||||||
| def _proj_transform_clip(xs: np.typing.ArrayLike, ys: np.typing.ArrayLike, zs: np.typing.ArrayLike, M:np.ndarray, focal_length: np.typing.ArrayLike) -> tuple[np.ndarray, np.ndarray, np.ndarray]: ... | ||||||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Suggested change
| ||||||
| def _proj_points(points: np.typing.ArrayLike, M: np.ndarray) -> np.ndarray: ... | ||||||
| def _proj_trans_points(points: np.typing.ArrayLike, M: np.ndarray) -> tuple[float, float, float]: ... | ||||||
Uh oh!
There was an error while loading.Please reload this page.