MCPcopy Index your code
hub / github.com/bqplot/bqplot / shape

Function shape

bqplot/marks.py:49–57  ·  view source on GitHub ↗
(*dimensions)

Source from the content-addressed store, hash-verified

47
48# Shape constraint for array-types
49def shape(*dimensions):
50 def validator(trait, value):
51 err_msg_tmpl = 'Expected an array of shape {} ' + \
52 'but got an array of shape {}'
53 if value.shape != dimensions:
54 raise TraitError(err_msg_tmpl.format(dimensions, value.shape))
55 else:
56 return value
57 return validator
58
59
60class Mark(Widget):

Callers 2

ImageClass · 0.85
_infer_x_for_lineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…