hi all,
i've been using genfromtxt to parse tab separated files for plotting
purposes in matplotlib. the problem is that genfromtxt seems to give
only two ways to access the contents of the file: one is by column,
where you can use:
d = genfromtxt(...)
and then do d['header_name1'] to access the
hi all,
in my code, i use the function 'logsumexp' from scipy.maxentropy a
lot. as far as i can tell, this function has no vectorized version
that works on an m-x-n matrix. i might be doing something wrong here,
but i found that this function can run extremely slowly if used as
follows: i have an
On Tue, Oct 13, 2009 at 7:59 PM, David Warde-Farley wrote:
> On 13-Oct-09, at 5:01 PM, per freem wrote:
>
>> hi all,
>>
>> i have a series of probability vector that i'd like to feed into
>> multinomial to get an array of vector outcomes back. for example,
>&
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
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
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
hi all,
i'm trying to find the function for the pdf of a multivariate normal pdf. i
know that the function "multivariate_normal" can be used to sample from the
multivariate normal distribution, but i just want to get the pdf for a given
vector of means and a covariance matrix. is there a function