On Fri, Oct 24, 2008 at 4:23 PM, Mathew Yeates <[EMAIL PROTECTED]> wrote:
> h. I don't understand the result.
>
> If
> a=array([ 1, 2, 3, 7, 10]) and b=array([ 1, 2, 3, 8, 10])
>
> I want to get the result [0,1,2,4] but[searchsorted(a,b) produces
> [0,1,2,4,4] ?? and searchsorted(b,a) pr
h. I don't understand the result.
If
a=array([ 1, 2, 3, 7, 10]) and b=array([ 1, 2, 3, 8, 10])
I want to get the result [0,1,2,4] but[searchsorted(a,b) produces
[0,1,2,4,4] ?? and searchsorted(b,a) produces [0,1,2,3,4]
??
Mathew
On Fri, Oct 24, 2008 at 3:12 PM, Charles R Harris <[EMA
On Fri, Oct 24, 2008 at 3:48 PM, Mathew Yeates <[EMAIL PROTECTED]> wrote:
> Hi
> I have 2 vectors A and B. For each value in A I want to find the location
> in B of the same value. Both A and B have unique elements.
>
> Of course I could something like
> For each index of A:
>v =A[index]
Hi
I have 2 vectors A and B. For each value in A I want to find the location
in B of the same value. Both A and B have unique elements.
Of course I could something like
For each index of A:
v =A[index]
location = numpy.where(B == v)
But I have very large lists and it will take too