Skip to content

Commit

Permalink
looser type hint Real|float for checker.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianPugh committed Jan 2, 2025
1 parent 4d37f59 commit 02c437e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions py360convert/e2p.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

def e2p(
e_img: NDArray[DType],
fov_deg: Union[Real, tuple[float, float]],
fov_deg: Union[float, int, tuple[float | int, float | int]],
u_deg: float,
v_deg: float,
out_hw: tuple[int, int],
Expand Down Expand Up @@ -55,10 +55,10 @@ def e2p(

h, w = e_img.shape[:2]

if isinstance(fov_deg, Real):
if isinstance(fov_deg, (int, float, Real)):
h_fov = v_fov = float(np.deg2rad(float(fov_deg)))
else:
h_fov, v_fov = map(np.deg2rad, fov_deg)
h_fov, v_fov = float(np.deg2rad(fov_deg[0])), float(np.deg2rad(fov_deg[1]))

order = mode_to_order(mode)

Expand Down

0 comments on commit 02c437e

Please sign in to comment.