Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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'>
Add Comment
Please, Sign In to add comment