MCPcopy Create free account
hub / github.com/apple/ml-pointersect / extents

Function extents

cdslib/core/utils/print_and_save.py:674–679  ·  view source on GitHub ↗
(ts)

Source from the content-addressed store, hash-verified

672 ys = np.arange(arr.shape[0])
673
674 def extents(ts):
675 if len(ts) == 1:
676 delta = 1
677 else:
678 delta = ts[1] - ts[0]
679 return [ts[0] - delta / 2, ts[-1] + delta / 2]
680
681 norm = matplotlib.colors.Normalize(vmin=arr.min(), vmax=arr.max())
682 cmap = matplotlib.cm.get_cmap("viridis")

Callers 1

imagescFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected