Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old October 10th, 2008, 10:25 PM
Terry Reedy
Guest
 
Posts: n/a
Default Re: indexing arrays

John [H2O] wrote:
Quote:
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.
Quote:
>
I thought I could do the following:
Quote:
Quote:
>>>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:
>
Quote:
Quote:
>>>a = acc[140:148,5:19]
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles