MCPcopy
hub / github.com/tinygrad/tinygrad / wrapper

Function wrapper

tinygrad/nn/state.py:39–39  ·  view source on GitHub ↗
(fn: Tensor|str|pathlib.Path)

Source from the content-addressed store, hash-verified

37def accept_filename(func: Callable[[Tensor], T]) -> Callable[[Tensor|str|pathlib.Path], T]:
38 @functools.wraps(func)
39 def wrapper(fn: Tensor|str|pathlib.Path) -> T: return func(Tensor(pathlib.Path(fn)) if not isinstance(fn, Tensor) else fn)
40 return wrapper
41
42@accept_filename

Callers

nothing calls this directly

Calls 1

TensorClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…