On 12-Oct-09, at 11:53 PM, per freem wrote:
> what i want to do is pick the columns l of p, and multiply each one by
> the numbers in s. the first step, picking columns l of p, is simply:
>
> cols = p[arange(3), l]
This isn't picking columns of p, this is picking the times at (0, 0),
(1, 0), a
On Sat, Oct 10, 2009 at 2:49 PM, David Cournapeau wrote:
> On Sat, Oct 10, 2009 at 1:24 AM, Peter
> wrote:
>> On Fri, Oct 9, 2009 at 5:56 AM, David Cournapeau
>> wrote:
>>>
>>> Since inspect is used in quite a few places, and that we only use it to
>>> extract arguments from a function, I added
hi all,
i am trying to write a simple product of 3 arrays (as vectorized code)
but am having some difficulty. i have three arrays, one is a list
containing several lists:
p = array([[ 0.2, 0.8], [ 0.5, 0.5], [ 0.3, 0.7]])
each list in the array 'p' is of size N -- in this case N = 2. i have
a
On Mon, Oct 12, 2009 at 3:25 PM, per freem wrote:
> hi all,
>
> i have a piece of code that relies heavily on sampling from
> multinomial distributions and using their results to compute log
> probabilities. my code makes heavy use of 'multinomial' from scipy,
> and of 'logsumexp'.
>
> my code is
hi all,
i have a piece of code that relies heavily on sampling from
multinomial distributions and using their results to compute log
probabilities. my code makes heavy use of 'multinomial' from scipy,
and of 'logsumexp'.
my code is unusually slow, and profiling it with Python's "cPickle"
module r
On Mon, Oct 12, 2009 at 9:39 AM, Gökhan Sever wrote:
>
>
> On Mon, Oct 12, 2009 at 9:18 AM, per freem wrote:
>
>> hi all,
>>
>> i'm trying to find nonzero elements in an array, as follows:
>>
>> a = array([[1, 0],
>> [1, 1],
>> [1, 1],
>> [0, 1]])
>>
>> i want to find all eleme
On Mon, Oct 12, 2009 at 9:18 AM, per freem wrote:
> hi all,
>
> i'm trying to find nonzero elements in an array, as follows:
>
> a = array([[1, 0],
> [1, 1],
> [1, 1],
> [0, 1]])
>
> i want to find all elements that are [1,1]. i tried: nonzero(a ==
> [1,0]) but i cannot interpre
On Mon, Oct 12, 2009 at 10:18 AM, per freem wrote:
> hi all,
>
> i'm trying to find nonzero elements in an array, as follows:
>
> a = array([[1, 0],
> [1, 1],
> [1, 1],
> [0, 1]])
>
> i want to find all elements that are [1,1]. i tried: nonzero(a ==
> [1,0]) but i cannot interpre
hi all,
i'm trying to find nonzero elements in an array, as follows:
a = array([[1, 0],
[1, 1],
[1, 1],
[0, 1]])
i want to find all elements that are [1,1]. i tried: nonzero(a ==
[1,0]) but i cannot interpret the output. the output i get is:
(array([0, 0, 1, 2]), array([0, 1
Amenity Applewhite wrote:
Having trouble viewing
this email? Click here
10 matches
Mail list logo