Skip to content

Commit

Permalink
Change taps typehint
Browse files Browse the repository at this point in the history
Fix #36
  • Loading branch information
Setsugennoao committed Sep 12, 2024
1 parent 6588fad commit b13d199
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vskernels/kernels/various.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Lanczos(CustomComplexTapsKernel):
:param taps: taps param for lanczos kernel
"""

def __init__(self, taps: int = 3, **kwargs: Any) -> None:
def __init__(self, taps: float = 3, **kwargs: Any) -> None:
super().__init__(taps, **kwargs)

@inject_self.cached
Expand All @@ -87,7 +87,7 @@ def kernel(self, *, x: float) -> float:
class Gaussian(CustomComplexTapsKernel):
"""Gaussian resizer."""

def __init__(self, sigma: float = 0.5, taps: int = 2, **kwargs: Any) -> None:
def __init__(self, sigma: float = 0.5, taps: float = 2, **kwargs: Any) -> None:
"""Sigma is the same as imagemagick's sigma scaling."""

self._sigma = sigma
Expand Down Expand Up @@ -116,7 +116,7 @@ def kernel(self, *, x: float) -> float:
class BlackMan(CustomComplexTapsKernel):
"""Blackman resizer."""

def __init__(self, taps: int = 4, **kwargs: Any) -> None:
def __init__(self, taps: float = 4, **kwargs: Any) -> None:
super().__init__(taps, **kwargs)

def _win_coef(self, x: float) -> float:
Expand Down Expand Up @@ -144,7 +144,7 @@ def _win_coef(self, x: float) -> float:
class Sinc(CustomComplexTapsKernel):
"""Sinc resizer."""

def __init__(self, taps: int = 4, **kwargs: Any) -> None:
def __init__(self, taps: float = 4, **kwargs: Any) -> None:
super().__init__(taps, **kwargs)

@inject_self.cached
Expand Down

0 comments on commit b13d199

Please sign in to comment.