indexing arrays

J

John [H2O]

E

Emily Rodgers

John said:
I'm having trouble slicing arrays:

I thought I could do the following:
i = array(range(140,149))
j = array(range(5,20))
a = acc[i,j]
Traceback (most recent call last):
File "<string>", line 1, in <string>
ValueError: shape mismatch: objects cannot be broadcast to a single shape

It's strange, because I can do this:
a = acc[140:148,5:19]


Anyone know what I am doing wrong?

What data structure is acc, and what are you trying to do?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top