hi everybody..... i'm using an array to make a program but i'm not able to find the size (length) of the array.can anyone tell me how to do this?
nish88
0
Light Poster
Recommended Answers
Jump to PostIf you mean an array in the numpy sense. e.g.,
z = numpy.zeros([5,3],float)
then the shape attribute is what you want, e.g.z.shape
returns (5,3).If you're implementing an array as a Python list, then
len(z)
is what you want.
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.