Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Open
Zrahay wants to merge1 commit intomatplotlib:main
base:main
Choose a base branch
Loading
fromZrahay:feature/typehinting
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletionslib/mpl_toolkits/mplot3d/proj3d.pyi
View file
Open in desktop
Original file line numberDiff line numberDiff 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: ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
def_persp_transformation(zfront:np.typing.ArrayLike,zback:np.typing.ArrayLike,focal_length:np.typing.ArrayLike)->np.ndarray: ...
def_persp_transformation(zfront:float,zback:float,focal_length:float)->np.ndarray: ...




def _ortho_transformation(zfront, zback) -> np.ndarray: ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
def_ortho_transformation(zfront,zback)->np.ndarray: ...
def_ortho_transformation(zfront:float,zback:float)->np.ndarray: ...




def _proj_transform_vec(vec: np.typing.ArrayLike, M: np.typing.ArrayLike) -> tuple[float, float, float]: ...
Copy link
Member

Choose a reason for hiding this comment

The 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]: ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
def_proj_transform_vec_clip(vec:np.typing.ArrayLike,M:np.ndarray,focal_length:np.typing.ArrayLike)->tuple[np.ndarray,np.ndarray,np.ndarray]: ...
def_proj_transform_vec_clip(vec:np.ndarray,M:np.ndarray,focal_length:float)->tuple[np.ndarray,np.ndarray,np.ndarray]: ...

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]: ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
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]: ...
def_proj_transform_clip(xs:np.typing.ArrayLike,ys:np.typing.ArrayLike,zs:np.typing.ArrayLike,M:np.ndarray,focal_length:float)->tuple[np.ndarray,np.ndarray,np.ndarray]: ...


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]: ...
Loading

[8]ページ先頭

©2009-2025 Movatter.jp