On Thu, Nov 26, 2009 at 7:35 PM, Nils Wagner
wrote:
>
>
> Sorry, I mixed up '+' and '&'
>
a = array(([True,True],[True,True]))
b = array(([False,False],[False,False]))
a & b
> array([[False, False],
> [False, False]], dtype=bool)
>
> Cheers,
>
> Nils
hey,
this
On Fri, Nov 27, 2009 at 1:37 AM, Charles R Harris
wrote:
> Hi Pauli,
>
> On Thu, Nov 26, 2009 at 4:08 PM, Pauli Virtanen wrote:
>>
>> Hi,
>>
>> The Python 3 porting needs some decisions on what is Bytes and
>> what is Unicode.
>>
>> I'm currently taking the following approach. Comments?
>>
>>
On Fri, Nov 27, 2009 at 12:55 AM, Gökhan Sever wrote:
>
>
> On Thu, Nov 26, 2009 at 11:30 PM, Richared Beare
> wrote:
>>
>> I have been unable to find a way of doing a very simple thing: saving
>> data that contains both arrays of numerical values and arrays of string
>> values, using savetxt in
On Thu, Nov 26, 2009 at 11:30 PM, Richared Beare <
richard.be...@sci.monash.edu.au> wrote:
> I have been unable to find a way of doing a very simple thing: saving
> data that contains both arrays of numerical values and arrays of string
> values, using savetxt in numpy.
>
> As a very simple exampl
On Fri, Nov 27, 2009 at 12:16 AM, Wayne Watson
wrote:
> I have a list that already has the frequencies from 0 to 255. However,
> I'd like to make a histogram that has say 32 bins whose ranges are 0-7,
> 8-15, ... 248-255. Is it possible?
If they have equal sized (width) bins, then you should be
I have been unable to find a way of doing a very simple thing: saving
data that contains both arrays of numerical values and arrays of string
values, using savetxt in numpy.
As a very simple example, suppose a is a numpy array of integers and b
is one containing strings, e.g.:
a = np.array
josef.p...@gmail.com wrote:
> On Thu, Nov 26, 2009 at 9:48 PM, wrote:
>
>> On Thu, Nov 26, 2009 at 8:18 PM, Wayne Watson
>> wrote:
>>
>>> Yes, I'm just beginning to deal with the contents of NumPy, SciLab, and
>>> SciPy. They all have seemed part of one another, but I think I see how
>
I have a list that already has the frequencies from 0 to 255. However,
I'd like to make a histogram that has say 32 bins whose ranges are 0-7,
8-15, ... 248-255. Is it possible?
--
Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
(121.015 Deg. W, 39.262 Deg. N)
On Thu, Nov 26, 2009 at 9:48 PM, wrote:
> On Thu, Nov 26, 2009 at 8:18 PM, Wayne Watson
> wrote:
>> Yes, I'm just beginning to deal with the contents of NumPy, SciLab, and
>> SciPy. They all have seemed part of one another, but I think I see how
>> they've divided up the game. NumPy has no graph
On Thu, Nov 26, 2009 at 8:18 PM, Wayne Watson
wrote:
> Yes, I'm just beginning to deal with the contents of NumPy, SciLab, and
> SciPy. They all have seemed part of one another, but I think I see how
> they've divided up the game. NumPy has no graphics. PyLab has them,
> basically under matplotlib
On Thu, Nov 26, 2009 at 6:53 PM, David Warde-Farley wrote:
> It seems like I've done this enough times on enough machines but I'm
> still running into problems...
>
> After installing what I'm pretty sure is a complete ATLAS+LAPACK and
> building numpy against it (appropriately editing site.cfg, e
It seems like I've done this enough times on enough machines but I'm
still running into problems...
After installing what I'm pretty sure is a complete ATLAS+LAPACK and
building numpy against it (appropriately editing site.cfg, etc.) I'm
faced with this when building numpy-1.3.0:
d...@mirag
Yes, I'm just beginning to deal with the contents of NumPy, SciLab, and
SciPy. They all have seemed part of one another, but I think I see how
they've divided up the game. NumPy has no graphics. PyLab has them,
basically under matplotlib. histogram seems a bit odd to me. Here's
what I mean. I
Hi Pauli,
On Thu, Nov 26, 2009 at 4:08 PM, Pauli Virtanen wrote:
> Hi,
>
> The Python 3 porting needs some decisions on what is Bytes and
> what is Unicode.
>
> I'm currently taking the following approach. Comments?
>
>***
>
> dtype field names
>
>Either Bytes or Unicode.
>
to, 2009-11-26 kello 15:08 -0800, Wayne Watson kirjoitti:
> I guess the answer is easy about why a plot is not produced. The remark
> in the histogram line says this will not work in numpy. Oh, well.
It works as it is intended to work. Numpy's histogram function just
computes the histogram -- you
Hi,
The Python 3 porting needs some decisions on what is Bytes and
what is Unicode.
I'm currently taking the following approach. Comments?
***
dtype field names
Either Bytes or Unicode.
But 'a' and b'a' are *different* fields.
The issue is that:
Pyt
I guess the answer is easy about why a plot is not produced. The remark
in the histogram line says this will not work in numpy. Oh, well.
Wayne Watson wrote:
> josef.p...@gmail.com wrote:
>
>> On Thu, Nov 26, 2009 at 2:44 PM, Wayne Watson
>> wrote:
>>
>>
>>> I decided to try some exam
josef.p...@gmail.com wrote:
> On Thu, Nov 26, 2009 at 2:44 PM, Wayne Watson
> wrote:
>
>> I decided to try some example code from Subject.
>>
>> import numpy
>> import pylab
>> # Build a vector of 1 normal deviates with variance 0.5^2 and mean 2
>> mu, sigma = 2, 0.5
>> v = numpy.random.nor
On Thu, Nov 26, 2009 at 2:44 PM, Wayne Watson
wrote:
> I decided to try some example code from Subject.
>
> import numpy
> import pylab
> # Build a vector of 1 normal deviates with variance 0.5^2 and mean 2
> mu, sigma = 2, 0.5
> v = numpy.random.normal(mu,sigma,1)
> # Plot a normalized hi
I decided to try some example code from Subject.
import numpy
import pylab
# Build a vector of 1 normal deviates with variance 0.5^2 and mean 2
mu, sigma = 2, 0.5
v = numpy.random.normal(mu,sigma,1)
# Plot a normalized histogram with 50 bins
pylab.hist(v, bins=50, normed=1) # matplot
On Thu, 26 Nov 2009 15:14:04 +0100
Fabrice Silva wrote:
> Le jeudi 26 novembre 2009 à 14:44 +0100, Gael Varoquaux
>a écrit :
>> On Thu, Nov 26, 2009 at 02:43:14PM +0100, Fabrice Silva
>>wrote:
>> > Le jeudi 26 novembre 2009 à 18:26 +0200, Nadav Horesh
>>a écrit :
>> > > It is obvious to me th
On Thu, Nov 26, 2009 at 11:49 AM, wrote:
> On Thu, Nov 26, 2009 at 11:34 AM, wrote:
>> why is http://docs.scipy.org/numpy/docs/numpy.matrixlib.defmatrix.matrix.I/
>> classified as unimportant? .T ?
>>
>> I was looking at http://projects.scipy.org/numpy/ticket/1093 and
>> didn't find any docs
On Thu, Nov 26, 2009 at 11:34 AM, wrote:
> why is http://docs.scipy.org/numpy/docs/numpy.matrixlib.defmatrix.matrix.I/
> classified as unimportant? .T ?
>
> I was looking at http://projects.scipy.org/numpy/ticket/1093 and
> didn't find any docs for the matrix inverse.
Ok looking some more, I f
why is http://docs.scipy.org/numpy/docs/numpy.matrixlib.defmatrix.matrix.I/
classified as unimportant? .T ?
I was looking at http://projects.scipy.org/numpy/ticket/1093 and
didn't find any docs for the matrix inverse.
Josef
___
NumPy-Discussion mailin
Yep that will do nicely, code becomes
import sys, os, glob
import numpy as np
def averageEightDays(files, numrows, numcols, year, doy):
""" Read in 8 files at a time, sum the valid LST, keep a count of
the valid pixels and average the result every 8days. """
mdekauwe wrote:
>
> Vincent Schut-2 wrote:
>> Oh, and minor issue: creating a array of zeros and then multiplying with
>> -999 still makes an array of zeros... I'd incorporated an array of
>> *ones* multiplied with -999, because for the last chunk of days you
>> could end up with a 8day array o
Le jeudi 26 novembre 2009 à 14:44 +0100, Gael Varoquaux a écrit :
> On Thu, Nov 26, 2009 at 02:43:14PM +0100, Fabrice Silva wrote:
> > Le jeudi 26 novembre 2009 à 18:26 +0200, Nadav Horesh a écrit :
> > > It is obvious to me that True+False == True,. Why do you think it should
> > > be False?
>
>
On 11/26/2009 8:20 AM, Nils Wagner wrote:
> a = array(([True,True],[True,True]))
> b = array(([False,False],[False,False]))
> a+b
NumPy's boolean operations are very well behaved.
>>> a = np.array(([True,True],[True,True]))
>>> a+a
array([[ True, True],
[ True, True]], dtype=bool)
Comp
Vincent Schut-2 wrote:
>
> Oh, and minor issue: creating a array of zeros and then multiplying with
> -999 still makes an array of zeros... I'd incorporated an array of
> *ones* multiplied with -999, because for the last chunk of days you
> could end up with a 8day array only partly filled wi
On Thu, Nov 26, 2009 at 02:43:14PM +0100, Fabrice Silva wrote:
> Le jeudi 26 novembre 2009 à 18:26 +0200, Nadav Horesh a écrit :
> > It is obvious to me that True+False == True,. Why do you think it should
> > be False?
> I would understand it is not obvious that '+' stands for logical 'or',
> and
Le jeudi 26 novembre 2009 à 18:26 +0200, Nadav Horesh a écrit :
> It is obvious to me that True+False == True,. Why do you think it should
> be False?
>
I would understand it is not obvious that '+' stands for logical 'or',
and '*' for logical 'and'...
--
Fabrice Silva
LMA UPR CNRS 7051
_
It is obvious to me that True+False == True,. Why do you think it should
be False?
Nadav
On Thu, 2009-11-26 at 14:20 +0100, Nils Wagner wrote:
> Hi all,
>
> is the following behaviour correct
>
> >>> a = array(([True,True],[True,True]))
> >>> b = array(([False,False],[False,False]))
>
> >>>
mdekauwe wrote:
> Thanks...I have adopted that and as you said it is a lot neater! Though I
> need to keep the pixel count for a weighting in another piece of code so
> have amended your logic slightly.
Alternatively, you could simply take the sum over axis=0 of the weight
array to get the pixel
Hi all,
is the following behaviour correct
>>> a = array(([True,True],[True,True]))
>>> b = array(([False,False],[False,False]))
>>> a+b
array([[ True, True],
[ True, True]])
I have expected False.
Nils
___
NumPy-Discussion mailing list
Thanks...I have adopted that and as you said it is a lot neater! Though I
need to keep the pixel count for a weighting in another piece of code so
have amended your logic slightly.
#!/usr/bin/env python
import sys, os, glob
import numpy as np
def averageEightDays(filenamesList, numrows, numcol
Hi mdekauwe,
as long as your data size is small enough to fit a 8x array in memory
and use it, why not just skip the running total and average 8 data
arrays each 8day period? And skip the x and y loops; these are real
performance killers. As a bonus, your code gets a lot smaller and more
reade
Thanks. Agreed it will break down under that scenario but that shouldn't be
encountered as I am simply checking the value is greater than what I have
set the undefined to be (-999.0). Here is the refjigged logic using numpy
functionality for anyone who it might help. Would appreciate any suggestio
37 matches
Mail list logo