MCPcopy
hub / github.com/dask/dask / draw_sizes

Function draw_sizes

dask/array/svg.py:274–279  ·  view source on GitHub ↗

Get size in pixels for all dimensions

(shape, size=200)

Source from the content-addressed store, hash-verified

272
273
274def draw_sizes(shape, size=200):
275 """Get size in pixels for all dimensions"""
276 mx = max(shape)
277 ratios = [mx / max(0.1, d) for d in shape]
278 ratios = [ratio_response(r) for r in ratios]
279 return tuple(size / r for r in ratios)
280
281
282def ratio_response(x):

Callers 4

test_draw_sizesFunction · 0.90
svg_2dFunction · 0.85
svg_3dFunction · 0.85
svg_ndFunction · 0.85

Calls 2

maxFunction · 0.85
ratio_responseFunction · 0.85

Tested by 1

test_draw_sizesFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…