Re: [Numpy-discussion] LittleEndian

2006-06-21 Thread Albert Strasheim
Hey Sheldon With NumPy you can use dtype's newbyteorder method to convert any dtype's byte order to an order you specify: In [1]: import numpy as N In [2]: x = N.array([1],dtype='i4') In [3]: y = N.array([1],dtype='i4') In [4]: xle = N.asarray(x, dtype=x.dtype.newbyteorder('')) In [5]: yle =

Re: [Numpy-discussion] Time for beta1 of NumPy 1.0

2006-07-01 Thread Albert Strasheim
Hey Chuck -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of Charles R Harris Sent: 01 July 2006 19:57 To: Robert Kern Cc: numpy-discussion@lists.sourceforge.net Subject: Re: [Numpy-discussion] Time for beta1 of NumPy 1.0 All, This is bit

Re: [Numpy-discussion] Ctypes support in NumPy

2006-07-03 Thread Albert Strasheim
Hello all Travis Oliphant wrote: snip Unfortunately, from the source code this is not true. It would be an improvement, but the source code shows that the from_param of each type does something special and only works with particular kinds of data-types --- basic Python types or ctypes

Re: [Numpy-discussion] A C++ library and the new array interface: the best approach?

2006-07-04 Thread Albert Strasheim
Hello all On Mon, 03 Jul 2006, Travis Oliphant wrote: Fernando Perez wrote: Hi all, but my lack of familiarity with all the details of new type creation got me a bit lost. I'm sure the information I need is all there, but right now I don't really see the forest with all the

Re: [Numpy-discussion] Ctypes support in NumPy

2006-07-04 Thread Albert Strasheim
Hello all On Tue, 04 Jul 2006, Thomas Heller wrote: Albert Strasheim schrieb: Hey Thomas Thomas Heller wrote: Thomas Heller schrieb: I've also played a little, and I think one important limitation in ctypes is that items in the argtypes list have to be ctypes types. Thi

Re: [Numpy-discussion] NumPy C-API now has prefixes

2006-07-07 Thread Albert Strasheim
Hello all Please, try out the new C-API and let's get the bugs wrinkled out. Hopefully this will give us a more solid foundation for the future... I've already committed changes to matplotlib SVN that allow it to work with old and new NumPy. What implications, if any, do these changes

Re: [Numpy-discussion] Numpy array from ctypes pointer object?

2006-07-12 Thread Albert Strasheim
Hello all Various people wrote: Im curious though: the several projects recently using ctypes and numpy to wrap libraries (Pygame SDL, OpenGL, svm) must have come across the issue of using a creating a numpy array from a ctypes pointer. Ill have to look further. It depends on

Re: [Numpy-discussion] unique() should return a sorted array

2006-07-17 Thread Albert Strasheim
Hey David -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of David Huard Sent: 17 July 2006 16:11 To: numpy-discussion@lists.sourceforge.net Subject: Re: [Numpy-discussion] unique() should return a sorted array Hi, I attached a patch for

[Numpy-discussion] Allocating discontiguous arrays

2006-07-19 Thread Albert Strasheim
Hello all In some situations, I have to work with very large matrices. My Windows machine has 3 GB RAM, so I would expect to be able to use most of my process's address space for my matrix. Unfortunately, with matrices much larger than 700 or 800 MB, one starts running into heap fragmentation

Re: [Numpy-discussion] ctypes, numpy-array

2006-07-25 Thread Albert Strasheim
Hey Lars -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of Lars Friedrich Sent: 25 July 2006 12:50 To: numpy-discussion@lists.sourceforge.net Subject: [Numpy-discussion] ctypes, numpy-array Hello, I would like to work with some data using

Re: [Numpy-discussion] ctypes, numpy-array

2006-07-25 Thread Albert Strasheim
Hello all -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of Lars Friedrich Sent: 25 July 2006 13:55 To: numpy-discussion@lists.sourceforge.net Subject: Re: [Numpy-discussion] ctypes, numpy-array What's might be happening here is that

Re: [Numpy-discussion] lapack too small?

2006-07-25 Thread Albert Strasheim
Hey Mathew The problem is that ATLAS doesn't provide all the LAPACK functions, only a few that the ATLAS developers have optimized. To get a complete LAPACK library, you need to build the Fortran LAPACK library, and then put the ATLAS-optimized functions into this library. Details here:

Re: [Numpy-discussion] Version numbers again

2006-07-27 Thread Albert Strasheim
Hello all Another +1. When I build a Windows installer, I get: numpy-1.0b2.dev2915.win32-py2.4.exe This tells me everything I want to know. Regards, Albert -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of Sasha Sent: 27 July 2006 21:26 To:

[Numpy-discussion] NumPy, shared libraries and ctypes

2006-08-08 Thread Albert Strasheim
Hello all With the nice ctypes integration in NumPy, and with Python 2.5 which will include ctypes around the corner, a remote possibility exists that within the next year or two, I might not be the only person that wants to use NumPy with ctypes. This is probably going to mean that this someone

[Numpy-discussion] ctypes and ndpointer

2006-08-14 Thread Albert Strasheim
Hello all Just a quick note on the ndpointer function that Travis recently added to NumPy (thanks Travis!). When wrapping functions with ctypes, one can specify the argument types of the function. ctypes then checks that the parameters are valid before invoking the C function. This is described

Re: [Numpy-discussion] some work on arpack

2006-08-16 Thread Albert Strasheim
Hello all -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of David Grant Sent: 16 August 2006 17:11 To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] some work on arpack On 8/16/06, Keith Goodman [EMAIL PROTECTED] wrote:

Re: [Numpy-discussion] Interesting memory leak

2006-08-18 Thread Albert Strasheim
Hello all snip I decided to upgrade to 1.0b2 just to see what I get and now I get 7kB of possibly lost memory, coming from PyObject_Malloc (in /usr/lib/libpython2.4.so.1.0). This is a constant 7kB, however, and it isn't getting any larger if I increase the loop iterations. Looks good then.

Re: [Numpy-discussion] ctypes: how does load_library work ?

2006-08-18 Thread Albert Strasheim
Hello all -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of David Cournapeau Sent: 18 August 2006 06:55 To: Discussion of Numerical Python Subject: [Numpy-discussion] ctypes: how does load_library work ? snip That works OK, but to avoid the

Re: [Numpy-discussion] NumPy 1.0 release-candidate 1.0 this weekend

2006-09-13 Thread Albert Strasheim
Hello all I just ran NumPy and SciPy through Valgrind, and everything looks clean on that the NumPy side. Some other things that could be fixed for RC1: - GCC 4.1.1 warning in ufuncobject.c: numpy/core/src/ufuncobject.c: In function âPyUFunc_RegisterLoopForTypeâ:

Re: [Numpy-discussion] how to get info about internals of an arrayobject ?

2006-09-15 Thread Albert Strasheim
-Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of Sebastian Haase Sent: 15 September 2006 03:21 To: numpy-discussion Subject: [Numpy-discussion] how to get info about internals of an arrayobject ? Hi, what I'm asking is if numpy has an

Re: [Numpy-discussion] PyArray_DescrConverter - alignment / trailingunused bytes

2006-09-15 Thread Albert Strasheim
Hello all In [1]: import numpy as N In [3]: N.dtype({'names' : ['x', 'y'], 'formats' : [N.intc, N.float64]}, align=True) Out[3]: dtype([('x', 'i4'), ('', '|V4'), ('y', 'f8')]) The reason you might not have discovered this: In [2]: N.dtype? Type: type

Re: [Numpy-discussion] PyArray_DescrConverter - alignment / trailingunused bytes

2006-09-15 Thread Albert Strasheim
Hello all -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of Martin Wiechert Sent: 15 September 2006 19:53 To: Discussion of Numerical Python Subject: Re: [Numpy-discussion]PyArray_DescrConverter - alignment / trailingunused bytes On Friday

Re: [Numpy-discussion] PyArray_DescrConverter - alignment/ trailingunused bytes

2006-09-15 Thread Albert Strasheim
Argh snip One final question. To me the repr of a dtype with gaps is a little bit puzzling: dtype ({'names': ['a', 'b', 'c'], 'formats': ['a4', 'f8', 'f4'], 'offsets': [0, 16, 24]}) dtype([('a', '|S4'), ('', '|V12'), ('b', 'f8'), ('', '|V12'), ('c', 'f4')]) There should be

Re: [Numpy-discussion] compile error with python2.5

2006-09-17 Thread Albert Strasheim
Hello all These problems were fixed in SVN just after 1.0rc1 was released. http://projects.scipy.org/scipy/numpy/changeset/3119 Regards, Albert -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of Achim Gaedke Sent: 17 September 2006 22:00 To:

[Numpy-discussion] Vectorizing code, for loops, and all that

2006-10-02 Thread Albert Strasheim
Hello all I recently started looking at David Cournapeau's PyEM package, specifically his implementation of the K-Means algorithm. He implemented part of this algorithm with in pure Python version and also provided a Pyrex alternative that is significantly faster (about 10 times with the data I

Re: [Numpy-discussion] Vectorizing code, for loops, and all that

2006-10-02 Thread Albert Strasheim
Hello all -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of Travis Oliphant Sent: 03 October 2006 02:32 To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Vectorizing code, for loops, and all that Travis Oliphant wrote:

Re: [Numpy-discussion] Vectorizing code, for loops, and all that

2006-10-03 Thread Albert Strasheim
Hello all -Original Message- From: Travis Oliphant [mailto:[EMAIL PROTECTED] Sent: 03 October 2006 03:51 To: Discussion of Numerical Python; Albert Strasheim Subject: Re: ***[Possible UCE]*** Re: [Numpy-discussion] Vectorizing code, for loops, and all that snip Meanwhile, I can

Re: [Numpy-discussion] problem with lapack_lite / BLAS

2006-10-07 Thread Albert Strasheim
Hello all -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of Karol Langner Sent: 07 October 2006 14:07 To: NumPy List Subject: [Numpy-discussion] problem with lapack_lite / BLAS Dear list, I'm trying to compile ATLAS 3.6.0 and LAPACK 3.0

Re: [Numpy-discussion] More SVN testing

2006-10-12 Thread Albert Strasheim
Hello all -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of Tim Hochberg Sent: 12 October 2006 21:24 To: numpy-discussion Subject: [Numpy-discussion] More SVN testing I just checked in a couple of changes to SVN. I was going to check in

Re: [Numpy-discussion] some work on arpack

2006-10-22 Thread Albert Strasheim
Argh. snip In addition to the wrapper there is a Python interface (and some tests). I don't know if the interface is like eigs - I don't use Matlab. http://www.mathworks.de/access/helpdesk/help/techdoc/ref/index.html?/access/ helpdesk/help/techdoc/ref/eigs.html should give you some idea of

Re: [Numpy-discussion] Strange and hard to reproduce crash

2006-10-23 Thread Albert Strasheim
Hey Fernando Maybe you can give the code a spin under Valgrind. It's going to be slow, but if the crash is being caused by memory corruption that happens all the time as the process is running, maybe Valgrind will show it. You need some Valgrind suppressions for Python. It seems the 2.3 source

Re: [Numpy-discussion] Release of 1.0 coming

2006-10-23 Thread Albert Strasheim
Hey Travis -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of Travis Oliphant Sent: Tuesday, October 24, 2006 12:32 AM To: Discussion of Numerical Python Subject: [Numpy-discussion] Release of 1.0 coming The long awaited day is coming---

Re: [Numpy-discussion] Strange results when sorting array withfields

2006-10-23 Thread Albert Strasheim
Hello all -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of Travis Oliphant Sent: Tuesday, October 24, 2006 12:04 AM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Strange results when sorting array withfields snip It

Re: [Numpy-discussion] adding an attribute to an nd-array

2006-10-27 Thread Albert Strasheim
Hello all -Original Message- From: [EMAIL PROTECTED] [mailto:numpy- [EMAIL PROTECTED] On Behalf Of Travis Oliphant Sent: Thursday, October 19, 2006 5:45 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] adding an attribute to an nd-array Stefan van der Walt

Re: [Numpy-discussion] Reading records from file and sorting

2006-11-01 Thread Albert Strasheim
Hey George On Tue, 31 Oct 2006, George Sakkis wrote: 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,

Re: [Numpy-discussion] building fc6 rpm of numpy

2006-11-08 Thread Albert Strasheim
Howdy On Wed, 08 Nov 2006, Vincent Broman wrote: Building an rpm of numpy-1.0.1.dev3432-1 on fedora core 6 is failing for me. With either python-2.4.3 or 2.4.4 I try python setup.py bdist_rpm inside the source directory, and everything seems to go well except for many File listed twice

Re: [Numpy-discussion] building fc6 rpm of numpy

2006-11-08 Thread Albert Strasheim
Argh, On Thu, 09 Nov 2006, Albert Strasheim wrote: %_unpackaged_files_terminate_build 1 Cut and paste error. Make that %_unpackaged_files_terminate_build 0 Cheers, Albert - Using Tomcat but need to do more? Need