Created
February 14, 2019 16:13
-
-
Save Robofied/9574695d937ca99b9842c1b017191740 to your computer and use it in GitHub Desktop.
Numpy
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
import numpy as np | |
a = np.array([1.,2.,3.]) | |
print(a.shape) | |
b = np.array([[1.,2.,3.]]) | |
print(b.shape) | |
#[output]: | |
#(3,) | |
#(1, 3) | |
#dtype-> It will let you know about the data type of stored values in the array. | |
print(a.dtype) | |
#[Output]: | |
#float64 | |
#type-> It will return the type of object associated with the variable | |
print(type(a)) | |
#[Output]: | |
#<class 'numpy.ndarray'> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment