MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _is_mlx_array

Function _is_mlx_array

lib/matplotlib/cbook.py:2454–2463  ·  view source on GitHub ↗

Return whether *x* is a MLX Array.

(x)

Source from the content-addressed store, hash-verified

2452
2453
2454def _is_mlx_array(x):
2455 """Return whether *x* is a MLX Array."""
2456 try:
2457 # We're intentionally not attempting to import mlx. If somebody
2458 # has created a mlx array, mlx should already be in sys.modules.
2459 tp = sys.modules.get("mlx.core").array
2460 except AttributeError:
2461 return False # Module not imported or a nonstandard module with no Array attr.
2462 return (isinstance(tp, type) # Just in case it's a very nonstandard module.
2463 and isinstance(x, tp))
2464
2465
2466def _is_pandas_dataframe(x):

Callers 1

_unpack_to_numpyFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…