Hi apologies for the newbie question, but I'm wondering if someone can help me with two questions.
Example say I have this,
I have two questions.
Getting number of rows and columns is as simple as:
>>> import numpy as np >>> a=np.array([[1,2,3],[10,2,2]]) >>> num_rows, num_cols = a.shape >>> print num_rows, num_cols 2 3