python/numpy: how to get 2D array column length? December 23, 2023 by Tarik You can get the second dimension of the array as: a.shape[1]