UniCoreFW

is_typed_array()

Check if obj is a typed array (array.array in Python).

Implementation

Args: obj: The object to check Returns: True if obj is an array.array, False otherwise

Example

from array import array is_typed_array(array('i', [1, 2, 3]))

Expected output: True

Source Code

def is_typed_array(obj: Any) -> bool: from array import array return isinstance(obj, array)