daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Feb 16th, 2019 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import numpy as np
  2.  
  3. a = np.array([1.,2.,3.])
  4. print(a.shape)
  5. b = np.array([[1.,2.,3.]])
  6. print(b.shape)
  7.  
  8. #[output]:
  9. #(3,)
  10. #(1, 3)
  11.  
  12. #dtype-> It will let you know about the data type of stored values in the array.
  13. print(a.dtype)
  14.  
  15. #[Output]:
  16. #float64
  17.  
  18. #type-> It will return the type of object associated with the variable
  19. print(type(a))
  20.  
  21. #[Output]:
  22. #<class 'numpy.ndarray'>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top