Use .shape
to obtain a tuple of array dimensions:
>>> a.shape
(2, 2)
More Related Contents:
- How to print the full NumPy array, without truncation?
- What are the differences between numpy arrays and matrices? Which one should I use?
- Convert Python sequence to NumPy array, filling missing values
- Numpy array assignment with copy
- Working with big data in python and numpy, not enough ram, how to save partial results on disc?
- numpy matrix vector multiplication [duplicate]
- How to remove specific elements in a numpy array
- Repeating each element of a numpy array 5 times
- how does multiplication differ for NumPy Matrix vs Array classes?
- Find nearest indices for one array against all values in another array – Python / NumPy
- Convert a 1D array to a 2D array in numpy
- Ambiguity in Pandas Dataframe / Numpy Array “axis” definition
- How to split/partition a dataset into training and test datasets for, e.g., cross validation?
- How to create a numpy array of arbitrary length strings?
- How to extend an array in-place in Numpy?
- Numpy modify array in place?
- Subsetting a 2D numpy array
- How to normalize a 2-dimensional numpy array in python less verbose?
- What is the difference between ndarray and array in NumPy?
- Removing elements from an array that are in another array
- Creating same random number sequence in Python, NumPy and R
- Stocking large numbers into numpy array
- check for identical rows in different numpy arrays
- pd.Timestamp versus np.datetime64: are they interchangeable for selected uses?
- Numpy: For every element in one array, find the index in another array
- Prevent numpy from creating a multidimensional array
- Numpy – Replace a number with NaN
- Python: how to store a numpy multidimensional array in PyTables?
- get the i-th slice of the k-th dimension in a numpy array
- Convert list of lists with different lengths to a numpy array [duplicate]