named_array_like#
- named_arrays.named_array_like(a)#
Check if an object is compatible with the
named_arraysAPI.If the object has a
__named_array_function__method it is considered compatible.- Parameters:
a (Any) – Object to be checked for compatibility with the
named_arraysAPI.- Return type:
Examples
Instances of
named_arrays.ScalarArrayare compatible with thenamed_arraysAPIimport named_arrays as na na.named_array_like(na.ScalarArray(2))
True
But instances of
numpy.ndarrayare not compatibleimport numpy as np na.named_array_like(np.empty(3))
False