Re: [Numpy-discussion] installing numpy on Tiger

2006-10-31 Thread Erin Sheldon
On 10/31/06, Brian Granger <[EMAIL PROTECTED]> wrote:
> Nice binaries for gfortran can be found here:
>
> hpc.sourceforge.net/

Do you know how to make macports recognize this compiler if
it is outside the macports tree? I had a version of gfortran (4.2.0)
already on my system, but it insisted on compiling its own version
(4.1.1)
Erin

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


[Numpy-discussion] Reading records from file and sorting

2006-10-31 Thread George Sakkis
Is there a more elegant and/or faster way to read some records from a
file and then sort them by different fields ? What I have now is too
specific and error-prone in general:

import numpy as N
records = N.fromfile(a_file, dtype=N.dtype('i2,i4'))
records_by_f0 = records.take(records.getfield('i2').argsort())
records_by_f1 = records.take(records.getfield('i4',2).argsort())

If there's a better way, I'd like to see it; bonus points for in-place
sorting.

Thanks,
George


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] installing numpy on Tiger

2006-10-31 Thread Brian Granger
Nice binaries for gfortran can be found here:

hpc.sourceforge.net/



On 10/31/06, Erin Sheldon <[EMAIL PROTECTED]> wrote:
> Hi Alan -
>
> I have not had luck with the binary distros.  There is always
> something that doesn't work, so I will be interested in
> the results of your efforts.
>
> The biggest problem with compiling things yourself is going
> to be dealing with LAPACK and fortran issues, and the
> backends in matplotlib.
>
> FWIW, the most stable solution I have found that doesn't involve
> dealing with dependencies yourself is darwinports (now
> macports).  It currently has 1.0b5 numpy and scipy 0.5.1, which
> depend on python 2.4. Matplotlib worked with the wxPython
> backend but not others.  While not the latest versions it will get
> you started, and I would guess 1.0 will be available soon (anyone?).
> I had absolutely zero problems using this once I realized that I
> had to use wxPython for the plotting backend.  The snag
> is that gfortran is needed, which requires compiling gcc 4.0 which
> took 6 hours on my powerbook, so you will need some patience.
>
> Erin
>
> On 10/31/06, Steve Lianoglou <[EMAIL PROTECTED]> wrote:
> > Hi Alan,
> >
> >
> > >  I installed Python 2.5
> > > from python.org painlessly, but it looks like
> > > I'll have to compile numpy from source.
> > > Do I understand that right?
> >
> > I believe you'll have to if you want to use Python 2.5.
> >
> > > ... so I am hoping someone patient
> > > will point me to or lead me through the steps I need
> > > to take to successfully install numpy on this platform.
> >
> > I think the instructions on the scipy wiki are pretty thorough:
> > http://scipy.org/Installing_SciPy/Mac_OS_X
> >
> > One thing to note is that I think I've seen on this list that people
> > have been having problems compiling and using num/scipy on Python 2.5
> > (on any platform (?)) ... I haven't tried it myself, but that's the
> > general feeling I've gotten from some of the emails on that subject.
> > I could be wrong though.
> >
> > Another thing to consider would be to install the "Superpack" which
> > is linked to in the mac section from the scipy downloads page:
> > http://www.scipy.org/Download
> >
> > I also remember seeing on the ML that there were some problems w/
> > that superpack it not including some config file for ipython or
> > something, but I'm not sure.
> >
> > For what it's worth, I'm using MacPorts (http://macports.org) to
> > manage my python (and a other) installations, and have been compiling
> > scipy/numpy/matplotlib/ipython from svn checkouts every now and
> > again ... this has been working well for me. The version of python
> > you get from macports is 2.4.3
> >
> > Hope that helps.
> > -steve
> >
> >
> > -
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job 
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > ___
> > Numpy-discussion mailing list
> > Numpy-discussion@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/numpy-discussion
> >
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Numpy-discussion mailing list
> Numpy-discussion@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] Need more comments from scientific community on python-dev

2006-10-31 Thread Bill Baxter
One thing I see with PIL and Matplotlib and PyOpenGL is that they're having to add specific support for Numpy and numeric and numarray and PIL and ctypes etc.I'm also in the camp that doesn't really understand this stuff well enough to really argue in favor of it, but would the proposed extensions make it possible for all these different packages to just have to support "buffer protocol" and magically be able to work with numpy or numeric without having to introduce explicit dependencies and support code for all those other packages?  If I've got the facts straight then I'd be happy to go and say that on 
comp.lang.python.--bbOn 10/31/06, Travis Oliphant <[EMAIL PROTECTED]> wrote:
I'm recruiting more comments on python-dev regarding my two proposalsfor improving Python's native ability to share ndarray-like information.
There is a dearth of scientific-computing and number-crunching-awarepeople on python-dev.  The result is that I sound like a lone voicearguing for something that nobody cares about.  When, I don't think that
is true.  Please, please.  If you want Python to grow support for thearray interface (or something like it), then please speak up onpython-dev.Even something as simple as I really see the need for a way to exchange
data-format information between two objects sharing the buffer protocolcan be helpful.You can post through the gmane newsgroup interface:gmane.comp.python.develFind any of the posts on the PEP's I've introduced.  Thanks for your help.
-Travis-Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___Numpy-discussion mailing listNumpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] Need more comments from scientific community on python-dev

2006-10-31 Thread Alexander Belopolsky
On 10/31/06, Travis Oliphant <[EMAIL PROTECTED]> wrote:
...
> Please understand what I meant.  I meant putting effort into getting
> PyArray_DescrConverter to allow ctypes inputs and convert to the
> appropriate PyArray_Descr * structure.   I already understand ctypes
> objects.  I want the dtype() command to also understand them.
>

I think I am starting to understand. Forgive me for being slow.

Is it correct that you don't mind writing c_int * 10 instead of
dtype(('http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] Need more comments from scientific community on python-dev

2006-10-31 Thread Josh Marshall

On 11/31/06, Fernando Perez <[EMAIL PROTECTED]> wrote:

> Fernando Perez wrote:
> ps - one more thing.  This guy:
>
> http://blog.vrplumber.com/
>
> has been rewriting the OpenGL bindings using ctypes, and I've seen
> posts from him about numpy (in his blog).  He might be able to
> contribute something...

I've been working on the OSX port and extensions for OpenGL-ctypes.  
(now released as PyOpenGL-3.00a, please test!). What Mike has done is  
define setuptools plugins to interface to different kinds of array  
data. The default type is ctypes arrays, or numpy arrays if numpy is  
installed. The data types handled are ctypes sized arrays, ctypes  
pointers, strings (read-only), and Python lists. (and old Numeric/ 
numarray via a non-default build.)

Summaries of development and usage, resp, are found:
http://pyopengl.sourceforge.net/ctypes/development.html
http://pyopengl.sourceforge.net/ctypes/using.html

Notes on array handling from the above:

> Perhaps the most complex mechanisms in OpenGL-ctypes are those  
> which implement the array-based operations which allow for using  
> low-level blocks of formatted data to communicate with the OpenGL  
> implementation.  OpenGL-ctypes preferred basic array implementation  
> is the (new) numpy reimplementation of the original Numeric Python.
>
> The array handling functionality provided within OpenGL-ctypes is  
> localised to the OpenGL.arrays sub-package.  Within the package,  
> there are two major classes, one (the FormatHandler) which  
> implements an interface to a way of storing data in Python, and  
> another (the ArrayDatatype) which models an OpenGL array format.   
> The ArrayDatatype classes use FormatHandlers to manipulate array- 
> compatible objects for use in the system.
and on FormatHandlers, for each of the datatypes I mentioned earlier:

> Each format handler is responsible for implementing an API that  
> ArrayDatatypes can use to work with the Python data-format.  Data- 
> formats can support a subset of the API, they only need to support  
> those aspects of the data-format which make sense.
Now, I haven't spent much time looking at these parts of OpenGL- 
ctypes, as they have just worked for me. I would think that it would  
be trivial to write a FormatHandler which uses the ndarray interface  
and data type description to use any object implenting it as an input  
for OpenGL. This would include things such as PIL images.

Mike, can you give us your opinion on how a standardised data type  
descriptor would be helpful for PyOpenGL? The PEP and some  
information about it can be found here:
http://www.scipy.org/ArrayInterfacePEP

Cheers,
Josh



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] Need more comments from scientific community on python-dev

2006-10-31 Thread Travis Oliphant
Sasha wrote:

>On 10/31/06, Travis Oliphant <[EMAIL PROTECTED]> wrote:
>
>  
>
>>Please read my posts about the Python type-object verses normal Python
>>Object situation.  That really is the crux of the matter.
>>
>>
>>
>I read the whole python-dev thread before replying.  I may be a little
>biased because I never liked somewhat cryptic letter codes in Numeric
>and the change of codes from Numeric to numpy did not contribute to my
>sympathy particularly when the convert script changed all unrelated
>instances of 'b' in my code to something else.  
>

The letter codes are not data-type objects.  The letter codes are only 
there for historical reasons (and they are in the struct and array 
modules too so blame Python...)

>I am also not a big
>fan of record arrays.  I believe that numeric data should be stored in
>"inverted tables," where columns of homogeneous data are stored
>contiguously. 
>
Sure.  I understand this.  This was my argument too when Numarray was 
first proposed.  But, how do you memory-map a record where the data is 
actually stored differently?  Numeric's answer is "you don't" but that 
is un-acceptable.  This is why record-arrays were created and the whole 
pandora's box of data-types was opened.

>  
>
>>Ctypes uses a Python type object for every data-format.
>>NumPy uses an instance of a data-type object for every data-format.
>>
>>
>>
>Yes, but AFAIK this is a recent innovation.  Numarray used type
>objects and Numeric simply used letter codes.
>
>  
>
Recent if 1 year is recent, and only if you worry precisely about when 
they were Python objects. Numeric always used a PyArray_Descr * 
structure (which was a PyObject_HEAD away from being a Python object) to 
describe data.   The letter codes were just simple ways to "represent" 
those underlying structures (which could have been exposed to Python as 
"data-types" from the very beginning.

>>What advantage do we gain by making every instance of a data-type object
>>*also* a Python type object?
>>
>>
>
>I think the main advantage is that you can have instances:
>  
>
c_int(42)


>c_int(42)
>
>Of course, numpy has scalars for that, but ctypes also has
>fixed-length arrays, that are somewhat different from ndarrays:
>  
>

Sure, but you don't "need" an instance for every memory-layout 
description.   If you want one, then great, ctypes gives it to you.  But 
"requiring" data-type to be encoded in a type object is over-kill.


>> We get a lot of head-ache.  Have you seen
>>what ctypes had to do?  It had to define a new Dictionary object so it
>>could attach it to the tp_dict parameter because you can't just inherit
>>from the PyTypeObject and add the fields you want to the structure.
>>This is my argument.
>>
>>
>>
>
>But, isn't this someone else's head-ache?  Someone has already gone
>through all these contortions, why not reuse the effort?  
>

No, it's not that simple.  We have a headache whenever we want to do 
something like I just did and separate out the concepts of what makes a 
Python Object a Python object.  Now, we don't just modify a simple 
C-structure (PyArray_Descr *), we have to modify a "meta-type" or a 
altered dictionary and get that change put in to ctypes.

Inheriting from Python type objects is harder.   People who have 
apparently never tried seem to think it's not but it is. 

>Others on
>python-dev described some specific needs of ctypes that your datatype
>object does not address.  Your point seems to be that numpy does not
>share these needs and could use a much simpler approach.
>  
>
No, that's not the point.  The data-type object could easily be extended 
to accomodate those needs.  The point is using data-types as instances 
of a regular Python object or data-types as instances of a "type" object.

>>I for one am not going to put any effort in that direction.  People are
>>free to do it, if they want, of course.  But, it's no small change.
>>
>>
>
>Can you present some use cases that illustrate the advantage of your
>datatype approach best?
>  
>
>I will try to implement them with ctypes.
>  
>
This is missing the point.  I have no doubt ctypes "could" be used on 
the Python side to describe a data-type.  But, we need the PyArray_Descr 
* structure in NumPy.  What are you going to replace the PyArray_Descr * 
structure with?  That is the point. 

>> I would, however, put effort into "undertstanding ctypes objects" as
>>data-type objects.
>>
>>
>
>Yes, this is the key.  I think we should better understand ctypes
>limitations before proposing an alternative.  
>
Please understand what I meant.  I meant putting effort into getting 
PyArray_DescrConverter to allow ctypes inputs and convert to the 
appropriate PyArray_Descr * structure.   I already understand ctypes 
objects.  I want the dtype() command to also understand them.

-Travis




-
Using Tomcat but need to do more? Need to support web ser

Re: [Numpy-discussion] Need more comments from scientific community on python-dev

2006-10-31 Thread Travis Oliphant
Sasha wrote:

>On 10/31/06, Travis Oliphant <[EMAIL PROTECTED]> wrote:
>  
>
>Yes, this is the key.  I think we should better understand ctypes
>limitations before proposing an alternative. 
>

I already understand it's practical limitations --- type objects as 
data-type instances is too bulky and too restrictive.  You have to "be a 
Python type object" in order to be a data-type object. 

I wish others would actually understand the difference.

-Travis


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] Need more comments from scientific community on python-dev

2006-10-31 Thread Sasha
On 10/31/06, Travis Oliphant <[EMAIL PROTECTED]> wrote:

> Please read my posts about the Python type-object verses normal Python
> Object situation.  That really is the crux of the matter.
>
I read the whole python-dev thread before replying.  I may be a little
biased because I never liked somewhat cryptic letter codes in Numeric
and the change of codes from Numeric to numpy did not contribute to my
sympathy particularly when the convert script changed all unrelated
instances of 'b' in my code to something else.  I am also not a big
fan of record arrays.  I believe that numeric data should be stored in
"inverted tables," where columns of homogeneous data are stored
contiguously.  With this disclaimer, I will address a few issues
below.

> Ctypes uses a Python type object for every data-format.
> NumPy uses an instance of a data-type object for every data-format.
>
Yes, but AFAIK this is a recent innovation.  Numarray used type
objects and Numeric simply used letter codes.


> What advantage do we gain by making every instance of a data-type object
> *also* a Python type object?

I think the main advantage is that you can have instances:
>>> c_int(42)
c_int(42)

Of course, numpy has scalars for that, but ctypes also has
fixed-length arrays, that are somewhat different from ndarrays:
>>> a10 = c_int*10
>>> a10()
<__main__.c_int_Array_10 object at 0x2a95816958>


>  We get a lot of head-ache.  Have you seen
> what ctypes had to do?  It had to define a new Dictionary object so it
> could attach it to the tp_dict parameter because you can't just inherit
> from the PyTypeObject and add the fields you want to the structure.
> This is my argument.
>

But, isn't this someone else's head-ache?  Someone has already gone
through all these contortions, why not reuse the effort?  Others on
python-dev described some specific needs of ctypes that your datatype
object does not address.  Your point seems to be that numpy does not
share these needs and could use a much simpler approach.

> I for one am not going to put any effort in that direction.  People are
> free to do it, if they want, of course.  But, it's no small change.

Can you present some use cases that illustrate the advantage of your
datatype approach best?
I will try to implement them with ctypes.

>  I would, however, put effort into "undertstanding ctypes objects" as
> data-type objects.

Yes, this is the key.  I think we should better understand ctypes
limitations before proposing an alternative.  At the end of the day,
it is better to have buffer protocol that describes the data using
ctypes types than to have no standard type information at all.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


[Numpy-discussion] Haley Padgett

2006-10-31 Thread Crystal Xiong
Odis Singleton




-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] Need more comments from scientific community on python-dev

2006-10-31 Thread Travis Oliphant
Sasha wrote:

>On 10/31/06, Travis Oliphant <[EMAIL PROTECTED]> wrote:
>  
>
>>I'm recruiting more comments on python-dev regarding my two proposals
>>for improving Python's native ability to share ndarray-like information.
>>
>>
>>
>
>I would love to help, but I feel that I will be on the other side of
>the disagreement.  (That's why I reply here rather than on python-dev
>first.)
>  
>

There's actually two issues here as well.

1) The extended buffer protocol

2) How to exchange data-format information through it.



-Travis


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] Need more comments from scientific community on python-dev

2006-10-31 Thread Travis Oliphant
Sasha wrote:

>On 10/31/06, Travis Oliphant <[EMAIL PROTECTED]> wrote:
>  
>
>>I'm recruiting more comments on python-dev regarding my two proposals
>>for improving Python's native ability to share ndarray-like information.
>>
>>
>>
>
>I would love to help, but I feel that I will be on the other side of
>the disagreement.  (That's why I reply here rather than on python-dev
>first.)
>  
>

Please read my posts about the Python type-object verses normal Python 
Object situation.  That really is the crux of the matter.

Ctypes uses a Python type object for every data-format.
NumPy uses an instance of a data-type object for every data-format.

What advantage do we gain by making every instance of a data-type object 
*also* a Python type object?  We get a lot of head-ache.  Have you seen 
what ctypes had to do?  It had to define a new Dictionary object so it 
could attach it to the tp_dict parameter because you can't just inherit 
from the PyTypeObject and add the fields you want to the structure.
This is my argument.

I for one am not going to put any effort in that direction.  People are 
free to do it, if they want, of course.  But, it's no small change.   I 
would, however, put effort into "undertstanding ctypes objects" as 
data-type objects.

-Travis




-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] Need more comments from scientific community on python-dev

2006-10-31 Thread Alan G Isaac
On Tue, 31 Oct 2006, Sasha apparently wrote: 
> I think we should attempt to implement a ctypes approach 

You are probably aware that Travis has addressed this at some length on
comp.python.devel (for example
http://article.gmane.org/gmane.comp.python.devel/84661 
http://article.gmane.org/gmane.comp.python.devel/84670 )
but just in case ...

Cheers,
Alan Isaac




-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] Need more comments from scientific community on python-dev

2006-10-31 Thread Sasha
On 10/31/06, Travis Oliphant <[EMAIL PROTECTED]> wrote:
>
> I'm recruiting more comments on python-dev regarding my two proposals
> for improving Python's native ability to share ndarray-like information.
>

I would love to help, but I feel that I will be on the other side of
the disagreement.  (That's why I reply here rather than on python-dev
first.)

I've suggested that numpy could use ctypes way to describe binary data
a long time ago:

http://sourceforge.net/mailarchive/message.php?msg_id=15395017

I agree that it would not work out of the box, but I don't see any
major obstacles to adding the missing features.

I think we should attempt to implement a ctypes approach and compare
the result to the dtype object approach.  If we discover any
unimplementable features along the way, this will be a strong argument
to abandon ctypes as a standard.

The last time I looked at the issue, the only feature that ctypes were
lacking for me was the itemsize information (endianness is probably
lacking as well, but I did not need it.)  I am not sure, however that
this information belongs to the type description object rather than
carried separately.

Note that it is trivial to add an itemsize attribute to ctypes because
each primitive ctype has a fixed itemsize and Structure can easily
compute its itemsize.  Doubling the number of ctypes to allow for
different endianness is a more troubling proposition.

In any case, I think  we should seriously discuss the relative merits
of the two approaches on this list and present our view to python-dev
when we reach some consensus.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] installing numpy on Tiger

2006-10-31 Thread Erin Sheldon
Hi Alan -

I have not had luck with the binary distros.  There is always
something that doesn't work, so I will be interested in
the results of your efforts.

The biggest problem with compiling things yourself is going
to be dealing with LAPACK and fortran issues, and the
backends in matplotlib.

FWIW, the most stable solution I have found that doesn't involve
dealing with dependencies yourself is darwinports (now
macports).  It currently has 1.0b5 numpy and scipy 0.5.1, which
depend on python 2.4. Matplotlib worked with the wxPython
backend but not others.  While not the latest versions it will get
you started, and I would guess 1.0 will be available soon (anyone?).
I had absolutely zero problems using this once I realized that I
had to use wxPython for the plotting backend.  The snag
is that gfortran is needed, which requires compiling gcc 4.0 which
took 6 hours on my powerbook, so you will need some patience.

Erin

On 10/31/06, Steve Lianoglou <[EMAIL PROTECTED]> wrote:
> Hi Alan,
>
>
> >  I installed Python 2.5
> > from python.org painlessly, but it looks like
> > I'll have to compile numpy from source.
> > Do I understand that right?
>
> I believe you'll have to if you want to use Python 2.5.
>
> > ... so I am hoping someone patient
> > will point me to or lead me through the steps I need
> > to take to successfully install numpy on this platform.
>
> I think the instructions on the scipy wiki are pretty thorough:
> http://scipy.org/Installing_SciPy/Mac_OS_X
>
> One thing to note is that I think I've seen on this list that people
> have been having problems compiling and using num/scipy on Python 2.5
> (on any platform (?)) ... I haven't tried it myself, but that's the
> general feeling I've gotten from some of the emails on that subject.
> I could be wrong though.
>
> Another thing to consider would be to install the "Superpack" which
> is linked to in the mac section from the scipy downloads page:
> http://www.scipy.org/Download
>
> I also remember seeing on the ML that there were some problems w/
> that superpack it not including some config file for ipython or
> something, but I'm not sure.
>
> For what it's worth, I'm using MacPorts (http://macports.org) to
> manage my python (and a other) installations, and have been compiling
> scipy/numpy/matplotlib/ipython from svn checkouts every now and
> again ... this has been working well for me. The version of python
> you get from macports is 2.4.3
>
> Hope that helps.
> -steve
>
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Numpy-discussion mailing list
> Numpy-discussion@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] installing numpy on Tiger

2006-10-31 Thread Steve Lianoglou
Hi Alan,


>  I installed Python 2.5
> from python.org painlessly, but it looks like
> I'll have to compile numpy from source.
> Do I understand that right?

I believe you'll have to if you want to use Python 2.5.

> ... so I am hoping someone patient
> will point me to or lead me through the steps I need
> to take to successfully install numpy on this platform.

I think the instructions on the scipy wiki are pretty thorough:
http://scipy.org/Installing_SciPy/Mac_OS_X

One thing to note is that I think I've seen on this list that people  
have been having problems compiling and using num/scipy on Python 2.5  
(on any platform (?)) ... I haven't tried it myself, but that's the  
general feeling I've gotten from some of the emails on that subject.  
I could be wrong though.

Another thing to consider would be to install the "Superpack" which  
is linked to in the mac section from the scipy downloads page:
http://www.scipy.org/Download

I also remember seeing on the ML that there were some problems w/  
that superpack it not including some config file for ipython or  
something, but I'm not sure.

For what it's worth, I'm using MacPorts (http://macports.org) to  
manage my python (and a other) installations, and have been compiling  
scipy/numpy/matplotlib/ipython from svn checkouts every now and  
again ... this has been working well for me. The version of python  
you get from macports is 2.4.3

Hope that helps.
-steve


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] installing numpy on Tiger

2006-10-31 Thread Fernando Perez
On 10/31/06, Alan Isaac <[EMAIL PROTECTED]> wrote:
> If other users will not profit from this question,
> please consider it OT and ignore it.  But perhaps
> it will prove useful to some potential numpy users.
>
> I am a long time Windows user who has been happily
> using the Python and numpy installers.  At work I
> need to use a Mac for a while.  I installed Python 2.5
> from python.org painlessly, but it looks like
> I'll have to compile numpy from source.
> Do I understand that right?
>
> I have used interpreted languages for pretty much
> all my computing needs, so I am hoping someone patient
> will point me to or lead me through the steps I need
> to take to successfully install numpy on this platform.

This is probably a good starting point:

http://www.scipy.org/Installing_SciPy/Mac_OS_X

There have been numerous threads on this issue recently, so you may
also want to do a bit of searching of the mailing list archives.

Cheers,

f

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


[Numpy-discussion] installing numpy on Tiger

2006-10-31 Thread Alan Isaac
If other users will not profit from this question,
please consider it OT and ignore it.  But perhaps
it will prove useful to some potential numpy users.

I am a long time Windows user who has been happily
using the Python and numpy installers.  At work I
need to use a Mac for a while.  I installed Python 2.5
from python.org painlessly, but it looks like
I'll have to compile numpy from source.
Do I understand that right?

I have used interpreted languages for pretty much
all my computing needs, so I am hoping someone patient
will point me to or lead me through the steps I need
to take to successfully install numpy on this platform.

Thank you,
Alan Isaac 


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] [SciPy-user] Need more comments from scientific community on python-dev

2006-10-31 Thread Fernando Perez
On 10/31/06, Travis Oliphant <[EMAIL PROTECTED]> wrote:
> Fernando Perez wrote:

> >I actually worry about the same: I really would like to help, but
> >after reading the whole discussion, I realized that the low-level
> >details being asked and discussed are something I don't really know
> >enough to say anything.  And I don't want to sound simply saying 'Hey,
> >Travis is great, listen to him!' to python-dev, since that (asides
> >from looking silly) can be somewhat counter-productive.
> >
> >
> >How does that sound, Travis?  Is that something you think might help
> >you, esp. since so many of us are feeling woefully underqualified to
> >lend a useful hand in the actual discussion on python-dev?
> >
> >
>
> That would be great.   I think a couple of things would also be useful.

OK, my experience so far has been that there's a certain 'activation
barrier' with Wikis, but once pages are there, people for some reason
feel more comfortable filling in.  So even though it's mostly a place
holder, I went ahead and made this:

http://www.scipy.org/ArrayInterfacePEP

Hopefully as the discussion evolves, this page can be filled in with
all the necessary info in one place, and it will become in a few days
a solid, organized repository of all the key points in this
discussion.  This will be a LOT easier to refer to in the python-dev
battle than randomly scattered bits of emails in the discussion
thread.

I'll try to spend more time on it over the next few days to fill in,
but I'm pretty busy with other things as well, so hopefully others can
pitch in as well.

Cheers,

f

ps - one more thing.  This guy:

http://blog.vrplumber.com/

has been rewriting the OpenGL bindings using ctypes, and I've seen
posts from him about numpy (in his blog).  He might be able to
contribute something...

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] [SciPy-user] Need more comments from scientific community on python-dev

2006-10-31 Thread Travis Oliphant
Fernando Perez wrote:

>On 10/31/06, Rich Shepard <[EMAIL PROTECTED]> wrote:
>  
>
>>On Tue, 31 Oct 2006, Alan Isaac wrote:
>>
>>
>>
>>>The easiest access to this discussion for me was
>>>http://news.gmane.org/group/gmane.comp.python.devel/ I cannot add to this
>>>discussion, but I REALLY hope others will help Travis out here.  (A few
>>>have.) He is fielding a lot of questions, some of which look to me to be
>>>from individuals who are ready to have fairly strong opinions without
>>>really understanding the "why" of his proposals.
>>>  
>>>
>>   All this is sufficiently far from my areas of expertise that I cannot
>>contribute anything useful. Otherwise, I'd be happy to lend support.
>>
>>
>
>I actually worry about the same: I really would like to help, but
>after reading the whole discussion, I realized that the low-level
>details being asked and discussed are something I don't really know
>enough to say anything.  And I don't want to sound simply saying 'Hey,
>Travis is great, listen to him!' to python-dev, since that (asides
>from looking silly) can be somewhat counter-productive.
>
>
>How does that sound, Travis?  Is that something you think might help
>you, esp. since so many of us are feeling woefully underqualified to
>lend a useful hand in the actual discussion on python-dev?
>  
>

That would be great.   I think a couple of things would also be useful.

1) Some way to indicate to python-dev that I'm actually speaking for 
more than just myself.  So, while I agree that just supporting my PEP 
(which probably in reality needs work) without understanding it is 
counter-productive, a voice that says.  "We really do need this kind of 
functionality" is at least one more voice. 

2) Examples of sharing memory between two objects.   PIL is the classic 
example and has some merit, but because the internal memory layout of 
the PIL is 'pointer-to-pointers' instead of 'big-chunk-of-memory' it's 
not a 1-1 match to NumPy and the array interface only can comunicate 
information about the "mode."  But, I can see other examples.  PyMedia, 
PyGame, PyVideo?  CVXOPT, PyVoxel. 

All of these seem to define their own objects which are basically just 
interpretations of chunks of memory.  At one time, we might have said 
"these should all be sub-classes of the ndarray".  Now, we are thinking 
more along the lines of "these should all expose an array interface".  
The array interface is still more bulky then it needs to be (it has to 
go through the attribute-lookup process which can be slow).   It would 
be much better if the extended buffer protocol were available as a 
function-pointer on the type object of the type.

If you have an application where you've ever wanted NumPy in the core.  
See if the extended buffer protocol serves your purposes and if you 
agree, voice your approval for the PEP. 

In my mind, the data-format PEP does not need to go through if there 
really is a better way to pass data-format information through the 
buffer protocol.   But, the extended buffer protocol we *do* need.


-Travis




>Regards,
>
>f
>___
>SciPy-user mailing list
>[EMAIL PROTECTED]
>http://projects.scipy.org/mailman/listinfo/scipy-user
>  
>


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] dtype.hasobject value

2006-10-31 Thread Travis Oliphant
Travis Oliphant wrote:

>Matthew Brett wrote:
>  
>
>>Hi,
>>
>>I notice that the value for:
>>
>>zeros((1,), dtype=object).dtype.hasobject
>>
>>is now 63, whereas previously it had been 1.  Is this intended?
>>
>>  
>>
>>
>
>Yes.  We are using hasobject as an 8-bit flag now and separating out 
>some of the concepts that make object arrays object arrays.
>
>This will be in 1.0.1 which will come out soon.  It should be binary 
>compatible with 1.0.
>  
>
Let me follow up with this.   I've changed back dtype.hasobject so that 
it returns a Python boolean object.  Thus comparisons to 1 should work 
fine.  Under the covers it is

(dtype->hasobject & NPY_ITEM_HASOBJECT) == NPY_ITEM_HASOBJECT)

There is a new attribute (flags) that contains all the flags in the 
hasobject variable.  

-Travis


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] Need more comments from scientific community on python-dev

2006-10-31 Thread David L Goldsmith
Perhaps you could please elaborate on what you regard as "the issue(s)" 
and "what's at stake"?  I'm still comparatively new (been using python 
and numpy circa 8-9 months), but so far I haven't encountered any 
problems I'd attribute to "Python's ... [in]ability to share 
ndarray-like information".  (The most vexing problems I've had have all 
been with matplotlib, its dual-mode API, and its rather clumsy and 
haphazard documentation.)  I'd like to be supportive, but not blindly-so.

DG

Travis Oliphant wrote:
> I'm recruiting more comments on python-dev regarding my two proposals 
> for improving Python's native ability to share ndarray-like information.
>
> There is a dearth of scientific-computing and number-crunching-aware 
> people on python-dev.  The result is that I sound like a lone voice 
> arguing for something that nobody cares about.  When, I don't think that 
> is true.  Please, please.  If you want Python to grow support for the 
> array interface (or something like it), then please speak up on 
> python-dev. 
>
> Even something as simple as I really see the need for a way to exchange 
> data-format information between two objects sharing the buffer protocol 
> can be helpful.
>
> You can post through the gmane newsgroup interface: 
>
> gmane.comp.python.devel
>
> Find any of the posts on the PEP's I've introduced.  Thanks for your help.
>
> -Travis
>
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Numpy-discussion mailing list
> Numpy-discussion@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>   


-- 
HMRD/ORR/NOS/NOAA 

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] [SciPy-user] Need more comments from scientific community on python-dev

2006-10-31 Thread John Hunter
> "Travis" == Travis Oliphant <[EMAIL PROTECTED]> writes:
Travis> All of these seem to define their own objects which are
Travis> basically just interpretations of chunks of memory.  At
Travis> one time, we might have said "these should all be
Travis> sub-classes of the ndarray".  Now, we are thinking more

What about blitting pixel buffers from mpl or chaco agg into various
GUI windows, GTK, Tk, WX, etc  This seems like a ready made case
for the array interface.  I could pipe in with an example like this if
it would help.

JDH

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] Need more comments from scientific community on python-dev

2006-10-31 Thread Alan Isaac
On Tue, 31 Oct 2006, Travis Oliphant wrote: 
> Please, please.  If you want Python to grow support for 
> the array interface (or something like it), then please 
> speak up on python-dev. 

The easiest access to this discussion for me was
http://news.gmane.org/group/gmane.comp.python.devel/
I cannot add to this discussion, but I REALLY hope others 
will help Travis out here.  (A few have.)  He is fielding a lot 
of questions, some of which look to me to be from 
individuals who are ready to have fairly strong opinions 
without really understanding the "why" of his proposals.

The good news is, there seems to be (on my naive reading) 
some sympathy for what Travis is trying to do.  I think more 
motivating examples would prove helpful in swinging things.

Cheers,
Alan Isaac




-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] [SciPy-user] Need more comments from scientific community on python-dev

2006-10-31 Thread Charles R Harris
On 10/31/06, John Hunter <[EMAIL PROTECTED]> wrote:
> "Travis" == Travis Oliphant <[EMAIL PROTECTED]> writes:Travis> All of these seem to define their own objects which areTravis> basically just interpretations of chunks of memory.  At
Travis> one time, we might have said "these should all beTravis> sub-classes of the ndarray".  Now, we are thinking moreWhat about blitting pixel buffers from mpl or chaco agg into various
GUI windows, GTK, Tk, WX, etc  This seems like a ready made casefor the array interface.  I could pipe in with an example like this ifit would help.I would also like to see the socket object take a more general type than python strings. I suspect there are a lot of such things in python -- interfaces to services and such -- that would benefit from using a more general interface to memory blocks. But I am not a python developer and don't really know how to make that case.
Chuck
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


[Numpy-discussion] Need more comments from scientific community on python-dev

2006-10-31 Thread Travis Oliphant

I'm recruiting more comments on python-dev regarding my two proposals 
for improving Python's native ability to share ndarray-like information.

There is a dearth of scientific-computing and number-crunching-aware 
people on python-dev.  The result is that I sound like a lone voice 
arguing for something that nobody cares about.  When, I don't think that 
is true.  Please, please.  If you want Python to grow support for the 
array interface (or something like it), then please speak up on 
python-dev. 

Even something as simple as I really see the need for a way to exchange 
data-format information between two objects sharing the buffer protocol 
can be helpful.

You can post through the gmane newsgroup interface: 

gmane.comp.python.devel

Find any of the posts on the PEP's I've introduced.  Thanks for your help.

-Travis


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


[Numpy-discussion] pyaudio 0.3, with docs !

2006-10-31 Thread David Cournapeau
Hi,

I improved pyaudio last WE using indications given by various people 
on the list or privately, and as I finally got the motivation to set-up 
something which looks like a webpage, there is a doc with examples which 
show how to use it. The API to open files for writing is much saner, and 
the setup.py should be smart enough to grab all informations necessary 
to the wrapper, including the location of the shared libsndfile:
   
download: 
http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/pyaudio/#installation
doc + examples: 
http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/pyaudio/

I would appreciate to hear reports on platforms which are not linux 
(windows, mac os X) to see if my the setup.py works there,

Cheers,

David

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion


Re: [Numpy-discussion] A way to compute a 2d histogram

2006-10-31 Thread Xavier Gnata
Hi,

Your histograms functions look fine for me :)
As it is a quite usual  operation on an array, I would suggest  to put 
it in numpy as numpy.histogram. IMHO, there is no point to create an 
numpy.stats only for histograms (or do you have plans to move other 
stats related function to numpy.stats?)

Xavier.

> Nicolas, thanks for the bug report, I fooled around with argument 
> passing and should have checked every case.
>
> You'll find the histogram function that deals with weights on the 
> numpy trac ticket 189, 
> I'm waiting for some hints as to where the histogram function should 
> reside (numpy.histogram, numpy.stats.histogram, ...) before submitting 
> a patch .
>
> Salut,
> David
>
>
> 2006/10/25, Nicolas Champavert <[EMAIL PROTECTED] 
> >:
>
> Hi,
>
> it would be great if you could add the weight option in the 1D
> histogram too.
>
> Nicolas
>
> David Huard a écrit :
> > Xavier,
> > Here is the patch against svn. Please report any bug. I haven't had
> > the time to test it extensively, something that should be done
> before
> > commiting the patch to the repo. I'd appreciate your feedback.
> >
> > David
> >
> > 2006/10/24, David Huard < [EMAIL PROTECTED]
> 
> > >>:
> >
> > Hi Xavier,
> >
> > You could tweak histogram2d to do what you want, or you
> could give
> > me a couple of days and I'll do it and let you know. If you want
> > to help, you could write a test using your particular
> application
> > and data.
> >
> > David
> >
> >
> > 2006/10/24, Xavier Gnata < [EMAIL PROTECTED]
> 
> >  >>:
> >
> > Hi,
> >
> > I have a set of 3 1D large arrays.
> > The first 2 one stand for the coordinates of particules and
> > the last one
> > for their masses.
> > I would like to be able to plot this data ie to compute
> a 2D
> > histogram
> > summing the masses in each bin.
> > I cannot find a way to do that without any loop on the
> indices
> > resulting
> > too a very slow function.
> >
> > I'm looking for an elegant way to do that with numpy (or
> > scipy??) function.
> >
> > For instance, scipy.histogram2d cannot do the job because it
> > only counts
> > the number of samples in each bin.
> > There is no way to deal with weights.
> >
> > Xavier.
> >
> >
> > --
> > 
> > Xavier Gnata
> > CRAL - Observatoire de Lyon
> > 9, avenue Charles André
> > 69561 Saint Genis Laval cedex
> > Phone: +33 4 78 86 85 28
> > Fax: +33 4 78 86 83 86
> > E-mail: [EMAIL PROTECTED]
>   >
> > 
> >
> >
> >
> -
> > Using Tomcat but need to do more? Need to support web
> > services, security?
> > Get stuff done quickly with pre-integrated technology to
> make
> > your job easier
> > Download IBM WebSphere Application Server v.1.0.1 based on
> > Apache Geronimo
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> 
> >
>  
> >
> > ___
> > Numpy-discussion mailing list
> > Numpy-discussion@lists.sourceforge.net
> 
> >  >
> >
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
> >
> >
> >
> >
>
> -
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?