2010/4/5 Ken Basye :
> I have two arrays, A and B, with the same shape. I want to find the
> highest values in A along some axis, then extract the corresponding
> values from B.
Maybe:
def select(A, B, axis):
# Extract incomplete index tuples:
argmax = a.argmax(axis = axis)
On 04/06/2010 03:22 PM, Ken Basye wrote:
> From: Vincent Schut
>> On 04/05/2010 06:06 PM, Keith Goodman wrote:
>>
>>> On Mon, Apr 5, 2010 at 8:44 AM, Ken Basye wrote:
>>>
snip
> b[a.argmax(axis=0), range(3)]
>
>>> array([0, 4, 5])
>>>
>>
>> Which does not work anymore when your arra
On Tue, Apr 6, 2010 at 9:22 AM, Ken Basye wrote:
> From: Vincent Schut
>
> On 04/05/2010 06:06 PM, Keith Goodman wrote:
>
>
> On Mon, Apr 5, 2010 at 8:44 AM, Ken Basye wrote:
>
>
> Hi Folks,
> I have two arrays, A and B, with the same shape. I want to find the
> highest values in A along some
From: Vincent Schut
On 04/05/2010 06:06 PM, Keith Goodman wrote:
On Mon, Apr 5, 2010 at 8:44 AM, Ken Basye wrote:
Hi Folks,
I have two arrays, A and B, with the same shape. I want to find the
highest values in A along some axis, then extract the corresponding
values from B. I can
On 04/05/2010 06:06 PM, Keith Goodman wrote:
> On Mon, Apr 5, 2010 at 8:44 AM, Ken Basye wrote:
>> Hi Folks,
>> I have two arrays, A and B, with the same shape. I want to find the
>> highest values in A along some axis, then extract the corresponding
>> values from B. I can get the highest val
On Mon, Apr 5, 2010 at 8:44 AM, Ken Basye wrote:
> Hi Folks,
> I have two arrays, A and B, with the same shape. I want to find the
> highest values in A along some axis, then extract the corresponding
> values from B. I can get the highest values in A with A.max(axis=0) and
> the indices of the
Hi Folks,
I have two arrays, A and B, with the same shape. I want to find the
highest values in A along some axis, then extract the corresponding
values from B. I can get the highest values in A with A.max(axis=0) and
the indices of these highest values with A.argmax(axis=0). I'm trying
to