Answers for "check if variable is array python"

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
Posted by: Guest on July-15-2020

Code answers related to "check if variable is array python"

Python Answers by Framework

Browse Popular Code Answers by Language