Skip to content

Instantly share code, notes, and snippets.

@GeorgeSeif
Last active July 17, 2019 23:22
Show Gist options
  • Select an option

  • Save GeorgeSeif/4feeac6004ccbeef1290cbd095c1a301 to your computer and use it in GitHub Desktop.

Select an option

Save GeorgeSeif/4feeac6004ccbeef1290cbd095c1a301 to your computer and use it in GitHub Desktop.
import numpy as np
# Gets the number of axes (dimensions)
np_array.ndim
# Gets the dimensions of the array
np_array.shape
# The total number of elements of the array
# (product of all elements # in np_array.shape)
np_array.size
# Describe the type of the elements in the array
np_array.dtype
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment