Skip to content

Instantly share code, notes, and snippets.

@megha444
Created October 13, 2020 12:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save megha444/1b5f2a3f4531df4b046f7c9c6949decb to your computer and use it in GitHub Desktop.
Save megha444/1b5f2a3f4531df4b046f7c9c6949decb to your computer and use it in GitHub Desktop.
import numpy as np
#Array object creation
num_array = np.array( [[3,2,1],
[7,1,5]] )
# Printing array object type
print("Array type is: ", type(num_array))
#Array dimensions
print("Number of dimensions: ", num_array.ndim)
# Shape of array
print("Shape of array: ", num_array.shape)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment