Hi all,
>From the list archives (2011), I noticed that there is a bug in the
python gzip module that causes genfromtxt to fail with python 2 but this
bug is not a problem for python 3. When I tried to use genfromtxt and
python 3 with a gzip'ed csv file, I instead got:
IOError: Mode rbU not suppo
> You'd want to update your mask appropriately to get everything you
> want to select, one criteria at a time e.g.:
> mask = a[:,0] == 1
> mask &= a[:,1] == 1960
>
> Alternatively:
> mask = (a[:,0] == 1) & (a[:,1] == 1960)
> but be careful with the parens, & and | are normally high-priority
> bitw
On 01/30/2012 12:13 PM, Brett Olsen wrote:
> On Mon, Jan 30, 2012 at 10:57 AM, Ted To wrote:
>> Sure thing. To keep it simple suppose I have just a two dimensional
>> array (time,output):
>> [(1,2),(2,3),(3,4)]
>> I would like to look at all values of output for
t index.
>>
>> 2012/1/30 Zachary Pincus
>> a[x,y,:]
>>
>> Read the slicing part of the tutorial:
>> http://www.scipy.org/Tentative_NumPy_Tutorial
>> (section 1.6)
>>
>> And the documentation:
>> http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html
Hi,
Is there some straightforward way to access an array by values across a
subset of its dimensions? For example, if I have a three dimensional
array a=(x,y,z), can I look at the values of z given particular values
for x and y?
Thanks,
Ted
___
NumPy-D
On 07/05/2011 11:07 AM, josef.p...@gmail.com wrote:
> For example sample x>=U and then sample y>=u-x. That's two univariate
> normal samples.
Ah, that's what I was looking for! Many thanks!
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
ht
On 07/05/2011 10:17 AM, josef.p...@gmail.com wrote:
> On Mon, Jul 4, 2011 at 10:13 PM, Ted To wrote:
>> Hi,
>>
>> Is there an easy way to make random draws from a conditional random
>> variable? E.g., draw a random variable, x conditional on x>=\bar x.
&
Hi,
Is there an easy way to make random draws from a conditional random
variable? E.g., draw a random variable, x conditional on x>=\bar x.
Thank you,
Ted To
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mail