MCPcopy Index your code
hub / github.com/scikit-learn/scikit-learn / _unwrap_memoryviewslices

Function _unwrap_memoryviewslices

sklearn/utils/_array_api.py:357–372  ·  view source on GitHub ↗
(*arrays)

Source from the content-addressed store, hash-verified

355
356
357def _unwrap_memoryviewslices(*arrays):
358 # Since _cyutility._memoryviewslice is an implementation detail of the
359 # Cython runtime, we would rather not introduce a possibly brittle
360 # import statement to run `isinstance`-based filtering, hence the
361 # attribute-based type inspection.
362 unwrapped = []
363 for a in arrays:
364 a_type = type(a)
365 if (
366 a_type.__module__ == "_cyutility"
367 and a_type.__name__ == "_memoryviewslice"
368 and hasattr(a, "base")
369 ):
370 a = a.base
371 unwrapped.append(a)
372 return unwrapped
373
374
375def get_namespace(

Callers 1

get_namespaceFunction · 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…