By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,711 Members | 2,130 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,711 IT Pros & Developers. It's quick & easy.

Re: indexing arrays

P: n/a
John [H2O] wrote:
I'm having trouble slicing arrays:
If these are numpy arrays, as appears, rather that array module arrays,
then the numpy list might be a better place. In any case, using 'numpy'
would have gotten the attention of someone scanning for posts about numpy.
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]
Oct 10 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.