Use numpy shape ...
import numpy as np
# create a 3 by 5 array of integer zeroes
z = np.zeros([3, 5], int)
print( z )
"""
[[0 0 0 0 0]
[0 0 0 0 0]
[0 0 0 0 0]]
"""
# check the shape
print( "shape --> %d rows x %d columns" % z.shape )
"""
[[0 0 0 0 0]
[0 0 0 0 0]
[0 0 0 0 0]]
shape --> 3 rows x 5 columns
"""
Last edited by vegaseat; Nov 8th, 2009 at 7:05 pm.
Reputation Points: 1333
Solved Threads: 1404
DaniWeb's Hypocrite
Offline 5,792 posts
since Oct 2004