Re: [Numpy-discussion] another numpy/ATLAS problem

2009-11-27 Thread David Warde-Farley
On 27-Nov-09, at 7:49 PM, David Cournapeau wrote: > I guess because of the updated threading support. Right you are; the 3.9 series is rather faster I find, at least in parallel. > I think the solution is to simply bypass the atlas mechanism to build > lapack, and do it manually. Tried that.

Re: [Numpy-discussion] Computing Simple Statistics When Only they Frequency Distribution is Known

2009-11-27 Thread Wayne Watson
I actually wrote my own several days ago. When I began getting myself more familiar with numpy, I was hoping there would be an easy to use version in it for this frequency approach. If not, then I'll just stick with what I have. It seems something like this should be common. A simple way to do

Re: [Numpy-discussion] Computing Simple Statistics When Only they Frequency Distribution is Known

2009-11-27 Thread josef . pktd
On Fri, Nov 27, 2009 at 9:47 PM, Wayne Watson wrote: > How do I compute avg, std dev, min, max and other simple stats if I only > know the frequency distribution? If you are willing to assign to all observations in a bin the value at the bin midpoint, then you could do it with weights in the stat

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread josef . pktd
On Fri, Nov 27, 2009 at 9:44 PM, Wayne Watson wrote: > Joseph, > That got it by the fig problem but there is yet another one. value is > not defined on the very long line: > range = ... >    Wayne (values is the data array, ... no idea about scientificstat.standardDeviation) Sebastian's example

[Numpy-discussion] Computing Simple Statistics When Only they Frequency Distribution is Known

2009-11-27 Thread Wayne Watson
How do I compute avg, std dev, min, max and other simple stats if I only know the frequency distribution? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W,

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread Wayne Watson
Joseph, That got it by the fig problem but there is yet another one. value is not defined on the very long line: range = ... Wayne josef.p...@gmail.com wrote: > On Fri, Nov 27, 2009 at 9:05 PM, Sebastian wrote: > > ... > you need to create a figure, before you can use it > > fig = pylab.f

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread Gökhan Sever
On Fri, Nov 27, 2009 at 8:05 PM, Sebastian wrote: > Hi Chris, yeah there should, try the following: > import numpy > import matplotlib.pyplot as pylab > regards > > Shouldn't the 2nd import be: import matplotlib.pyplot as plt ? > > On Fri, Nov 27, 2009 at 8:47 PM, Wayne Watson < > sierra_mtnv

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread josef . pktd
On Fri, Nov 27, 2009 at 9:05 PM, Sebastian wrote: > Hi Chris, yeah there should, try the following: > import numpy > import matplotlib.pyplot as pylab > regards > > On Fri, Nov 27, 2009 at 8:47 PM, Wayne Watson > wrote: >> >> I tried this and it put ranges on y from 0 to 0.45 and x from 5 to 50.

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread Sebastian
Hi Chris, yeah there should, try the following: import numpy import matplotlib.pyplot as pylab regards On Fri, Nov 27, 2009 at 8:47 PM, Wayne Watson wrote: > I tried this and it put ranges on y from 0 to 0.45 and x from 5 to 50. > > import numpy as np > import pylab > > v = np.array([20, 15,10,30

Re: [Numpy-discussion] another numpy/ATLAS problem

2009-11-27 Thread David Cournapeau
On Sat, Nov 28, 2009 at 8:29 AM, Charles R Harris wrote: > > > On Fri, Nov 27, 2009 at 4:18 PM, David Warde-Farley > wrote: >> >> On 27-Nov-09, at 5:02 PM, Charles R Harris wrote: >> >> > What version of ATLAS? >> >> 3.9.17, the latest development branch version. At some point in the > > 3.9.12 s

Re: [Numpy-discussion] another numpy/ATLAS problem

2009-11-27 Thread Charles R Harris
On Fri, Nov 27, 2009 at 4:18 PM, David Warde-Farley wrote: > On 27-Nov-09, at 5:02 PM, Charles R Harris wrote: > > > What version of ATLAS? > > 3.9.17, the latest development branch version. At some point in the 3.9.12 segfaulted on me while running, so I haven't bothered with versions after tha

Re: [Numpy-discussion] another numpy/ATLAS problem

2009-11-27 Thread David Warde-Farley
On 27-Nov-09, at 5:02 PM, Charles R Harris wrote: > What version of ATLAS? 3.9.17, the latest development branch version. At some point in the changelog the author mentions he removed other methods building with LAPACK, leaving only the tarfile one. I'm giving the entire build another try w

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread Wayne Watson
I tried this and it put ranges on y from 0 to 0.45 and x from 5 to 50. import numpy as np import pylab v = np.array([20, 15,10,30, 50, 30, 20, 25, 10]) #Plot a normalized histogram print np.linspace(0,50,10) pylab.hist(v, normed=1, bins=np.linspace(0,9,10), range=(0,100)) pylab.show() I added t

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Dag Sverre Seljebotn
Francesc Alted wrote: > A Friday 27 November 2009 16:41:04 Pauli Virtanen escrigué: I think so. However, I think S is probably closest to bytes... and maybe S can be reused for bytes... I'm not sure though. >>> That could be a good idea because that would ensure compatibility with >>> ex

Re: [Numpy-discussion] another numpy/ATLAS problem

2009-11-27 Thread Charles R Harris
On Fri, Nov 27, 2009 at 2:04 PM, David Warde-Farley wrote: > On 26-Nov-09, at 8:56 PM, Charles R Harris wrote: > > > I never had luck with the netlib-lapack-tarfile= > > option, it didn't build lapack correctly. Try doing them separately. > > I just tried that. > > -Ss flapack path/to/lapack_LINUX

Re: [Numpy-discussion] another numpy/ATLAS problem

2009-11-27 Thread David Warde-Farley
On 26-Nov-09, at 8:56 PM, Charles R Harris wrote: > I never had luck with the netlib-lapack-tarfile= > option, it didn't build lapack correctly. Try doing them separately. I just tried that. -Ss flapack path/to/lapack_LINUX.a didn't seem to build a proper LAPACK (it was missing all sorts of st

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Christopher Barker
Anne Archibald wrote: >>> I don't think it makes sense to handle format strings in Unicode >>> internally -- they should always be coerced to bytes. >> This should be fine -- we control what is a valid format string, and >> thus they can always be ASCII-safe. > > I have to disagree. Why should we

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Anne Archibald
2009/11/27 Christopher Barker : > >> The point is that I don't think we can just decide to use Unicode or >> Bytes in all places where PyString was used earlier. > > Agreed. I only half agree. It seems to me that for almost all situations where PyString was used, the right data type is a python3 s

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Pauli Virtanen
pe, 2009-11-27 kello 10:36 -0800, Christopher Barker kirjoitti: [clip] > > Which one it will > > be should depend on the use. Users will expect that eg. array([1,2,3], > > dtype='f4') still works, and they don't have to do e.g. array([1,2,3], > > dtype=b'f4'). > > Personally, I try to use np.float

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread Sebastian
Did you try using the parameter range? I do something like this. regards ax = fig.add_subplot(1,1,1) > pylab.title(r'\Large BCG NO radio distribution $ \rm{TITLE}$') > n, bins, patches = pylab.hist(values, bins=math.sqrt(len(values)), > range=(numpy.mean(values)-3*scientificstat.standardDeviation

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread Wayne Watson
Lots of good suggestions. I'll pull them into a document for further reference. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread Christopher Barker
josef.p...@gmail.com wrote: > On Fri, Nov 27, 2009 at 12:57 PM, Skipper Seabold wrote: >> This kind of info might be useful to other newcomers >> somewhere... ? Thoughts on >> posting this on the wiki here? > > I also agree. It will improve with the newl

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Christopher Barker
> The point is that I don't think we can just decide to use Unicode or > Bytes in all places where PyString was used earlier. Agreed. I think it's helpful to remember the origins of all this: IMHO, there are two distinct types of data that Python2 strings support: 1) text: this is the traditi

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread Ralf Gommers
On Fri, Nov 27, 2009 at 7:15 PM, wrote: > > Well put, Chris. It took me a long time get my head around these > > distinctions, and then only when others pointed out my errors in > > understanding. This kind of info might be useful to other newcomers > > somewhere...

Re: [Numpy-discussion] matrix inverse

2009-11-27 Thread Ralf Gommers
On Thu, Nov 26, 2009 at 5:55 PM, wrote: > 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.

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread josef . pktd
On Fri, Nov 27, 2009 at 12:57 PM, Skipper Seabold wrote: > On Fri, Nov 27, 2009 at 12:41 PM, Christopher Barker > wrote: >> 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 >>

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread Skipper Seabold
On Fri, Nov 27, 2009 at 12:41 PM, Christopher Barker wrote: > 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. > > For the record: > > I know this

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread Christopher Barker
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. For the record: I know this is a bit confusing, particularly for someone used to an integrated

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread Skipper Seabold
On Fri, Nov 27, 2009 at 12:14 PM, Wayne Watson wrote: > It's good to have some extra references for NumPy. > > Actually, it looks like exercising histogram in NunPy has gotten me past > the difficulties with hist in matplotlib. I Is there a matplotlib or > Pylab mailing list. It uses hist and look

Re: [Numpy-discussion] Is anyone knowledgeable about dll deployment on windows ?

2009-11-27 Thread David Cournapeau
On Fri, Nov 27, 2009 at 11:01 PM, Eloi Gaudry wrote: > David, > > I know this discussion first took place months ago, but I'd like to know > whether or not you find a solution to the SxS assemblies issues using > MSVC9.0. Which issue exactly are you talking about ? When python is installed for on

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread Wayne Watson
It's good to have some extra references for NumPy. Actually, it looks like exercising histogram in NunPy has gotten me past the difficulties with hist in matplotlib. I Is there a matplotlib or Pylab mailing list. It uses hist and looks very much like histogram, but has some parameters that I ne

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Francesc Alted
A Friday 27 November 2009 16:41:04 Pauli Virtanen escrigué: > > > I think so. However, I think S is probably closest to bytes... and > > > maybe S can be reused for bytes... I'm not sure though. > > > > That could be a good idea because that would ensure compatibility with > > existing NumPy scrip

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Pauli Virtanen
pe, 2009-11-27 kello 16:33 +0100, Francesc Alted kirjoitti: > A Friday 27 November 2009 15:09:00 René Dudfield escrigué: > > On Fri, Nov 27, 2009 at 1:49 PM, Francesc Alted wrote: > > > Correct. But, in addition, we are going to need a new 'bytes' dtype for > > > NumPy for Python 3, right? > > >

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Francesc Alted
A Friday 27 November 2009 15:09:00 René Dudfield escrigué: > On Fri, Nov 27, 2009 at 1:49 PM, Francesc Alted wrote: > > Correct. But, in addition, we are going to need a new 'bytes' dtype for > > NumPy for Python 3, right? > > I think so. However, I think S is probably closest to bytes... and >

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread josef . pktd
On Fri, Nov 27, 2009 at 8:43 AM, Wayne Watson wrote: > Thanks. That sounds like it should help a lot. Finding meaningful > examples anywhere hasn't been easy. I thought I'd look through Amazon > for books on Python and scientific uses. I found almost all were written > by authors outside the US, a

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread René Dudfield
On Fri, Nov 27, 2009 at 3:07 PM, René Dudfield wrote: > > hey, > > yeah I definitely would :)   I don't have much time for the next week > or so though. > btw, feel free to just copy whatever you like from there into your tree. cheers, ___ NumPy-Discuss

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread René Dudfield
On Fri, Nov 27, 2009 at 1:49 PM, Francesc Alted wrote: > Correct.  But, in addition, we are going to need a new 'bytes' dtype for NumPy > for Python 3, right? I think so. However, I think S is probably closest to bytes... and maybe S can be reused for bytes... I'm not sure though. Also, what wi

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread René Dudfield
On Fri, Nov 27, 2009 at 1:41 PM, Pauli Virtanen wrote: >> 2to3/3to2 fixers will probably have to be written for users code >> here... whatever is decided.  At least warnings should be generated >> I'm guessing. > > Possibly. Does 2to3 support plugins? If yes, it could be possible to > write one.

[Numpy-discussion] Is anyone knowledgeable about dll deployment on windows ?

2009-11-27 Thread Eloi Gaudry
David, I know this discussion first took place months ago, but I'd like to know whether or not you find a solution to the SxS assemblies issues using MSVC9.0. In case you haven't (the binaries package for windows is built using mingw), I'd like to know if this would be possible to relocate all

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread Wayne Watson
Thanks. That sounds like it should help a lot. Finding meaningful examples anywhere hasn't been easy. I thought I'd look through Amazon for books on Python and scientific uses. I found almost all were written by authors outside the US, and none seemed to talk about items like matplotlib. Ezdraw

Re: [Numpy-discussion] New behavior for correlate w.r.t. swapped input: deprecate current default for 1.4.0 ?

2009-11-27 Thread Charles R Harris
On Fri, Nov 27, 2009 at 3:04 AM, David Cournapeau < da...@ar.media.kyoto-u.ac.jp> wrote: > Hi, > >The function correlate can now implement what is generally accepted > as the definition of correlation, but you need to request this behavior > ATM (by default, it still does the wrong thing). Is

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Francesc Alted
A Friday 27 November 2009 13:23:10 René Dudfield escrigué: > >> I don't think they are internally UTF-8: > >> http://docs.python.org/3.1/c-api/unicode.html > >> > >> """Python’s default builds use a 16-bit type for Py_UNICODE and store > >> Unicode values internally as UCS2.""" > > > > Ah! No chan

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Pauli Virtanen
pe, 2009-11-27 kello 13:23 +0100, René Dudfield kirjoitti: [clip] > I imagine dtype 'S' and 'U' need more clarification. As it misses the > concept of encodings it seems? Currently, S appears to mean 8bit > characters no encoding, and U appears to mean 16bit characters no > encoding? Or are some

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread René Dudfield
On Fri, Nov 27, 2009 at 11:50 AM, Francesc Alted wrote: > A Friday 27 November 2009 11:27:00 Pauli Virtanen escrigué: >> Yes. But now I wonder, should >> >>       array(['foo'], str) >>       array(['foo']) >> >> be of dtype 'S' or 'U' in Python 3? I think I'm leaning towards 'U', >> which will me

Re: [Numpy-discussion] Installing numpy under cygwin

2009-11-27 Thread David Cournapeau
On Fri, Nov 27, 2009 at 7:11 PM, Olivia Cheronet wrote: > Hi, > > I have tried to remove my entire numpy directory and starting to build it > again from a newly downloaded source (numpy-1.3.0.tar.gz), but it has made no > difference. Please update to the trunk - I can see the error as well for

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Francesc Alted
A Friday 27 November 2009 11:27:00 Pauli Virtanen escrigué: > Yes. But now I wonder, should > > array(['foo'], str) > array(['foo']) > > be of dtype 'S' or 'U' in Python 3? I think I'm leaning towards 'U', > which will mean unavoidable code breakage -- there's probably no > avoiding i

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Pauli Virtanen
pe, 2009-11-27 kello 11:17 +0100, Francesc Alted kirjoitti: > A Friday 27 November 2009 10:47:53 Pauli Virtanen escrigué: > > 1) For 'S' dtype, I believe we use Bytes for the raw data and the > >interface. > > > >Maybe we want to introduce a separate "bytes" dtype that's an alias > >fo

[Numpy-discussion] New behavior for correlate w.r.t. swapped input: deprecate current default for 1.4.0 ?

2009-11-27 Thread David Cournapeau
Hi, The function correlate can now implement what is generally accepted as the definition of correlation, but you need to request this behavior ATM (by default, it still does the wrong thing). Is it ok to deprecate the default ? I.e. the behavior is exactly the same, but we warn users about th

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Francesc Alted
A Friday 27 November 2009 10:47:53 Pauli Virtanen escrigué: > 1) For 'S' dtype, I believe we use Bytes for the raw data and the >interface. > >Maybe we want to introduce a separate "bytes" dtype that's an alias >for 'S'? Yeah. As regular strings in Python 3 are Unicode, I think that

Re: [Numpy-discussion] Installing numpy under cygwin

2009-11-27 Thread Olivia Cheronet
Hi, I have tried to remove my entire numpy directory and starting to build it again from a newly downloaded source (numpy-1.3.0.tar.gz), but it has made no difference. I still get the output below. Thank you for the suggestions, Olivia ... ... ... creating build/temp.cygwin-1.5.25-i686-2.5 cre

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Pauli Virtanen
pe, 2009-11-27 kello 18:30 +0900, David Cournapeau kirjoitti: > Pauli Virtanen wrote: > > By the way, should I commit this stuff (after factoring the commits to > > logical chunks) to SVN? > > I would prefer getting at least one py3 buildbot before doing anything > significant, I can add it to min

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread David Cournapeau
Pauli Virtanen wrote: > By the way, should I commit this stuff (after factoring the commits to > logical chunks) to SVN? > I would prefer getting at least one py3 buildbot before doing anything significant, cheers, David ___ NumPy-Discussion mailing

Re: [Numpy-discussion] Bytes vs. Unicode in Python3

2009-11-27 Thread Pauli Virtanen
to, 2009-11-26 kello 17:37 -0700, Charles R Harris kirjoitti: [clip] > I'm not clear on your recommendation here, is it that we should use > bytes, with unicode converted to UTF8? The point is that I don't think we can just decide to use Unicode or Bytes in all places where PyString was used earli

Re: [Numpy-discussion] Producing a Histogram When Bins Are Known

2009-11-27 Thread Vincent Schut
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? > Wayne, you might find the 'numpy example list with doc' webpage quite informative... ht