MCPcopy Create free account
hub / github.com/PythonOT/POT / _check_args_backend

Function _check_args_backend

ot/backend.py:180–187  ·  view source on GitHub ↗
(backend_impl, args)

Source from the content-addressed store, hash-verified

178
179
180def _check_args_backend(backend_impl, args):
181 is_instance = set(isinstance(arg, backend_impl.__type__) for arg in args)
182 # check that all arguments matched or not the type
183 if len(is_instance) == 1:
184 return is_instance.pop()
185
186 # Otherwise return an error
187 raise ValueError(str_type_error.format([type(arg) for arg in args]))
188
189
190def get_backend_list():

Callers 1

get_backendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected