MCPcopy Create free account
hub / github.com/DPS2022/diffusion-posterior-sampling / lanczos2

Function lanczos2

util/resizer.py:181–184  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

179
180
181def lanczos2(x):
182 return (((np.sin(pi * x) * np.sin(pi * x / 2) + np.finfo(np.float32).eps) /
183 ((pi ** 2 * x ** 2 / 2) + np.finfo(np.float32).eps))
184 * (abs(x) < 2))
185
186
187def box(x):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected