MCPcopy
hub / github.com/dask/dask / sizeof_python_dict

Function sizeof_python_dict

dask/sizeof.py:92–98  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

90
91@sizeof.register(dict)
92def sizeof_python_dict(d):
93 return (
94 sys.getsizeof(d)
95 + sizeof(list(d.keys()))
96 + sizeof(list(d.values()))
97 - 2 * sizeof(list())
98 )
99
100
101@sizeof.register_lazy("cupy")

Callers

nothing calls this directly

Calls 2

keysMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…