get len of numpy array code example
Example 1: numpy array length
np_array.size
Example 2: length of a matrix in python
matrix = [[1, 2]]
rows = len(matrix) # Height.
columns = len(matrix[0]) # Width.
print(rows)
print(columns)
np_array.size
matrix = [[1, 2]]
rows = len(matrix) # Height.
columns = len(matrix[0]) # Width.
print(rows)
print(columns)