Created
January 22, 2019 06:45
-
-
Save mirrornerror/f067253f6060a191dabaa7567f858aa9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arr = np.array([1, 2, 3]) | |
print(type(arr)) | |
# <class 'numpy.ndarray'> | |
print(isinstance(arr, (np.ndarray))) | |
# True | |
ls = [1, 2, 3] | |
print(type(ls)) | |
# <class 'list'> | |
print(isinstance(ls, (np.ndarray))) | |
# False | |
x = [1, 2, 3] | |
print(isinstance(x, (list))) | |
# True | |
x = 1 | |
print(type(x)) | |
# <class 'int'> | |
print(isinstance(x, (np.ndarray))) | |
# False | |
print(isinstance(x, (list))) | |
# False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment