check if variable is array python code example
Example 1: numpy isinstance
>>> import numpy as np
a = np.array([1, 2, 3])
>>> type(a)
<type 'numpy.ndarray'>
>>> type(a).__module__
'numpy'
>>> type(a).__module__ == np.__name__
True
Example 2: python check array param
isinstance([0, 10, 20, 30], list) # True
isinstance(50, list) # False