(*arrays)
| 355 | |
| 356 | |
| 357 | def _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 | |
| 375 | def get_namespace( |
no outgoing calls
no test coverage detected
searching dependent graphs…