MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / set_framework_dependencies

Function set_framework_dependencies

utils/resize_right/interp_methods.py:17–25  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

15
16
17def set_framework_dependencies(x):
18 if type(x) is numpy.ndarray:
19 to_dtype = lambda a: a
20 fw = numpy
21 else:
22 to_dtype = lambda a: a.to(x.dtype)
23 fw = torch
24 eps = fw.finfo(fw.float32).eps
25 return fw, to_dtype, eps
26
27
28def support_sz(sz):

Callers 5

cubicFunction · 0.85
lanczos2Function · 0.85
lanczos3Function · 0.85
linearFunction · 0.85
boxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected