Skip to content

Commit

Permalink
Point: Alias descale method
Browse files Browse the repository at this point in the history
Bit of a dirty fix for a funny "bug".

The bug in question is that running `Point.descale`, it throws the following error:

```
Decustom: taps must be greater than 0.
```

This is obviously because the kernel radius for Point is 0. But as descaling Point is equivalent to scaling with Point, we can simply work around this by aliasing the descale method with the scale method.
  • Loading branch information
LightArrowsEXE committed Oct 6, 2024
1 parent 12d4662 commit 6f070ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vskernels/kernels/various.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class Point(CustomComplexKernel):
def kernel(self, *, x: float) -> float:
return 1.0

descale = CustomComplexKernel.scale


class Bilinear(CustomComplexKernel):
"""Bilinear resizer."""
Expand Down

0 comments on commit 6f070ce

Please sign in to comment.