MCPcopy Create free account
hub / github.com/MAC-VO/MAC-VO / is_valid_config

Method is_valid_config

DataLoader/Transform.py:46–51  ·  view source on GitHub ↗
(cls, config: SimpleNamespace | None)

Source from the content-addressed store, hash-verified

44 """
45 @classmethod
46 def is_valid_config(cls, config: SimpleNamespace | None) -> None:
47 cls._enforce_config_spec(config, {
48 "scale_u": lambda v: isinstance(v, (float, int)) and v > 0,
49 "scale_v": lambda v: isinstance(v, (float, int)) and v > 0,
50 "interp" : lambda v: v in {"nearest", "bilinear"}
51 })
52
53 @staticmethod
54 def scale_stereo(data: StereoData, scale_u: float, scale_v: float, interpolate: Literal["nearest", "bilinear"]) -> StereoData:

Callers

nothing calls this directly

Calls 1

_enforce_config_specMethod · 0.80

Tested by

no test coverage detected