MCPcopy Create free account
hub / github.com/bgrimstad/splinter / _transform_input

Method _transform_input

python/splinter/function.py:66–79  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

64 splinter._call(splinter._get_handle().splinter_bspline_save, self._handle, get_c_string(filename))
65
66 def _transform_input(self, x):
67 if isinstance(x, np.ndarray):
68 x = x.tolist()
69
70 if not isinstance(x, list):
71 x = [x]
72
73 # See if x is on the form [[x0,x1],[x2,x3]]
74 # if not we assume it to be on the form
75 # [x0, x1, x2, x3]
76 if isinstance(x[0], list):
77 x = flatten_list(x)
78
79 return x
80
81
82 def __del__(self):

Callers 3

evalMethod · 0.95
eval_jacobianMethod · 0.95
eval_hessianMethod · 0.95

Calls 1

flatten_listFunction · 0.85

Tested by

no test coverage detected