Re: [Numpy-discussion] C extension compiling question

2010-10-29 Thread Jon Wright
Dear Henry, You need to call import_array() in initspam. See: http://docs.scipy.org/doc/numpy-1.5.x/user/c-info.how-to-extend.html HTH, Jon On 29/10/2010 15:11, Henry Gomersall wrote: > I'm trying to get a really simple toy example for a numpy extension > working (you may notice its based on t

Re: [Numpy-discussion] Arrays of Python Values

2010-07-23 Thread Jon Wright
Ian Mallett wrote: > self.patches.sort( lambda > x,y:cmp(x.residual_radiance,y.residual_radiance), reverse=True ) > ... > > more, but I couldn't figure out how I'd handle the different attributes > (or specifically, how to keep them together during a sort). I'm not sure you gain much using num

Re: [Numpy-discussion] Finding Unique Pixel Values

2010-07-23 Thread Jon Wright
Ian Mallett wrote: > > To the second, actually, I need to increment the number of times the > index is there. For example, if b=[1,5,6,6,6,9], then a[6-1] would have > to be incremented by +3 = +1+1+1. I tried simply a[b-1]+=1, but it > seems to only increment values once, even if there are mo

[Numpy-discussion] A release for python 2.7?

2010-07-09 Thread Jon Wright
Hello, It seems that python 2.7 has been released, but the current numpy download on sourceforge (1.4.1) segfaults for me using mingw on windows. This seems to be fixed in trunk. Is a new release planned in the near future? Thanks Jon ___ NumPy-Dis

Re: [Numpy-discussion] Wrong Eigenvalue (Approximation?)

2010-05-18 Thread Jon Wright
Sebastian Haase wrote: > On Sun, May 16, 2010 at 2:13 PM, Alan G Isaac wrote: >> On 5/16/2010 12:03 AM, Gabriel Mihalache wrote: >>> The eigenvalue should be 1 exactly. >> http://floating-point-gui.de/ >> > Hi, just wondering why that site you just referred doesn't say who the > author is !? > It

[Numpy-discussion] put with increment ?

2010-04-29 Thread Jon Wright
Hello everyone, Is there a 'numpy' efficient way to do the following loop: for i, v in indices, values: total[ i ] += v The behaviour is like numpy.put, but instead of overwriting the array element, it is incremented. Currently I have a little C extension which does the job, but I'm lazy

Re: [Numpy-discussion] A faster median (Wirth's method)

2009-09-02 Thread Jon Wright
Chad Netzer wrote: > But Charles Harris's earlier suggestion of some hard coded medians for > common filter template sizes (ie 3x3, 5x5, etc.) may be a nice > addition to scipy, especially if it can be generalized somewhat to > other filters. > For 2D images try looking into PIL : ImageFilter.M

Re: [Numpy-discussion] Timeline for 1.4.0 and installer for Windows 64bit ?

2009-07-30 Thread Jon Wright
This one works for me with python2.6 for amd64 from python.org: http://sourceforge.net/projects/numpy/files/NumPy/1.3.0/numpy-1.3.0.win-amd64-py2.6.msi/download Thanks to David C. I believe Klaus Noekel wrote: > Dear folks, > > just over a month ago there was a thread about plans for numpy, and

Re: [Numpy-discussion] [Jepp-users] win64 numpy hangs during tests using embedded interpreter

2009-07-19 Thread Jon Wright
ters then it means it won't play nicely with extension modules who use PyGILState, like numpy. I can get around it by disabling threads in numpy altogether, but I'd rather have them working in these days of multi-core CPUs. Any ideas? Thanks, Jon Jon Wright wrote: > Hi There, >

Re: [Numpy-discussion] FFTW?? Do I need it to do Fourier transforms?

2009-04-10 Thread Jon Wright
Charles R Harris wrote: > On Fri, Apr 10, 2009 at 8:33 PM, John Seales > wrote: > > The link to FFTW on http://www.scipy.org/Installing_SciPy/Mac_OS_X > is broken. > > Is it needed to do Fourier Transforms? My main motivation for using > numpy and

Re: [Numpy-discussion] numpy via easy_install on windows

2009-03-13 Thread Jon Wright
David Cournapeau wrote: > I now remember that numpy could not be built from sources by > easy_install, but I believe we fixed the problem. Would you mind using > on a recent svn checkout ? I would like this to be fixed if that's > still a problem, With the current svn (6661) I can build using ming

Re: [Numpy-discussion] numpy via easy_install on windows

2009-03-12 Thread Jon Wright
David Cournapeau wrote: > Hi Jon, > > Jon Wright wrote: >> Hello, >> >> If I do: >> >> C:\> easy_install numpy >> >> ... on a windows box, it attempts to do a source download and build, >> which typically doesn't work. If howev

[Numpy-discussion] numpy via easy_install on windows

2009-03-12 Thread Jon Wright
Hello, If I do: C:\> easy_install numpy ... on a windows box, it attempts to do a source download and build, which typically doesn't work. If however I use: C:\> easy_install numpy==1.0.4 ... then the magic works just fine. Any chance of a more recent bdist_egg being made available for windo

Re: [Numpy-discussion] Proposal for changing the names of inverse trigonometrical/hyperbolic functions

2008-11-24 Thread Jon Wright
Eric Firing wrote: > Francesc Alted wrote: > >> So, IMHO, I think it would be better to rename the inverse trigonometric >> functions from ``arc*`` to ``a*`` prefix. > > +1 > I have stumbled over this myself. If there is resistance to removing -1 There is resistance. Please don't remove the o

Re: [Numpy-discussion] Report from SciPy

2008-08-24 Thread Jon Wright
Travis E. Oliphant wrote: > ... > * Thus 1.2 will not break ABI compatibility but will add new API features. > This is really great news (amongst the other good things). Many thanks for keeping the ABI compatible! All the best, Jon . ___ Numpy-disc

Re: [Numpy-discussion] C-API change for 1.2

2008-08-16 Thread Jon Wright
Robert Kern wrote: > > FWIW, neither PIL nor PyOpenGL have C code which uses numpy arrays, so > they are entirely unaffected. OK, so here are some projects which might notice a 1.2 installation, in as much as they turn up on a google code search for: #include "numpy/arrayobject.h" -scipy -enth

Re: [Numpy-discussion] C-API change for 1.2

2008-08-16 Thread Jon Wright
David Cournapeau wrote: > Does that mean we will continue breaking the ABI from time to time > during the 1.* cycle ? Can someone help me to understand me what is the compelling reason for this change? If it only means everyone recompiles, it is hard to see what we, as users, are gaining by doi

Re: [Numpy-discussion] C-API change for 1.2

2008-08-16 Thread Jon Wright
Travis, Stéfan, I missed Travis mail previously. Are you *really* sure you want force all C code which uses numpy arrays to be recompiled? If you mean that all your matplotlib/PIL/pyopengl/etc users are going to have to make a co-ordinated upgrade, then this seems to be a grave mistake. Does S

Re: [Numpy-discussion] NumPy 1.2.0b2 released

2008-08-15 Thread Jon Wright
Jarrod Millman wrote: > Hey, > > NumPy 1.2.0b2 is now available. Please test this so that we can > uncover any problems ASAP. > > Windows binary: > http://www.enthought.com/~gvaroquaux/numpy-1.2.0b2-win32.zip > Hello Again, It seems the new release breaks matplotlib, for those pauvres who ar

Re: [Numpy-discussion] NumPy 1.2.0b2 released

2008-08-14 Thread Jon Wright
Jarrod Millman wrote: > Hey, > > NumPy 1.2.0b2 is now available. Please test this so that we can > uncover any problems ASAP. > > Windows binary: > http://www.enthought.com/~gvaroquaux/numpy-1.2.0b2-win32.zip > As well as the ones from Alan, if you add the "-O" for optimise flag to your pytho

[Numpy-discussion] win32 1.1.1 testsuite issue with python -O

2008-08-06 Thread Jon Wright
Hello, If I use the "-O" switch then it seems getting some testcase failures, and finally a windows message that "python.exe has encountered a problem and needs to close. We are sorry for the inconvenience.". Running the testsuite via jepp (jepp.sourceforge.net) gives the same failures, plus

Re: [Numpy-discussion] RFC: A proposal for implementing some date/time types in NumPy

2008-07-11 Thread Jon Wright
Charles R Harris wrote: > On Fri, Jul 11, 2008 at 12:37 PM, Francesc Alted > A Friday 11 July 2008, Francesc Alted escrigué: > > A Friday 11 July 2008, Jon Wright escrigué: > > > Nice idea - please can you make it work with matplotlib's time/date &g

Re: [Numpy-discussion] RFC: A proposal for implementing some date/time types in NumPy

2008-07-11 Thread Jon Wright
Hello, Nice idea - please can you make it work with matplotlib's time/date stuff too? Thanks, Jon Francesc Alted wrote: ... > === > A proposal for implementing some date/time types in NumPy >

Re: [Numpy-discussion] calling numpy from java

2008-07-06 Thread Jon Wright
David Cournapeau wrote: > On Sun, Jul 6, 2008 at 9:55 PM, wilson <[EMAIL PROTECTED]> wrote: >> hi all, >> is it possible to use numpy functions (like eigh()..etc)from java >> code? isthere a java wrapper for numpy? Yes, it is possible, but not yet 100% convenient. Have a look at jepp, from jepp.

Re: [Numpy-discussion] A memory problem: why does mmap come up in numpy.inner?

2008-06-05 Thread Jon Wright
Michael Abshoff wrote: > Jonathan Wright wrote: >> >> ...etc. We needed this for generating the .so library file name for >> ctypes > > Can you elaborate on this a little? The "we" refered to another project (not numpy) where we needed to distinguish 32 bit from 64 bit platforms. We have code f

[Numpy-discussion] Matrix: potential usage case?

2008-04-29 Thread Jon Wright
Hi everyone, Despite being a bit lost in the matrix debate, today I was working on something which might want to use what is being described. You can see an array only version at: http://fable.svn.sourceforge.net/viewvc/fable/ImageD11/trunk/test/demo/latred.py?revision=2741&view=markup The pro

Re: [Numpy-discussion] Py3K

2008-04-15 Thread Jon Wright
Charles R Harris wrote: > Jon Wright wrote: > > I tried to build numpy from svn using python-3.0a4 from python.org > <http://python.org> and > noticed there are some issues (print, except syntax, distutils magic). > Has anyone been through this already?

[Numpy-discussion] Py3K

2008-04-15 Thread Jon Wright
I tried to build numpy from svn using python-3.0a4 from python.org and noticed there are some issues (print, except syntax, distutils magic). Has anyone been through this already? I actually want to start going through my own code, but I need numpy before I get started... Thanks, Jon

Re: [Numpy-discussion] Release of NumPy

2008-04-15 Thread Jon Wright
> On 15/04/2008, Alan G Isaac <[EMAIL PROTECTED]> wrote: ... > The proposal on the table is to remove an unneeded (and > unwanted) deviation of the matrix API from the ndarray API. ... How about writing up the changes needed PEP style on the wiki? > The fix appears to be a very small change in

Re: [Numpy-discussion] Release of NumPy

2008-04-15 Thread Jon Wright
Alan G Isaac wrote: > > Will matrix behavior change in 1.1, as discussed from time > to time? Perhaps it just takes a very small change in __getitem__: > http://www.mail-archive.com/numpy-discussion@scipy.org/msg07363.html> Quoting from: http://mail.python.org/pipermail/python-dev/2008-March/07

Re: [Numpy-discussion] Numpy/Cython Google Summer of Code project idea

2008-03-07 Thread Jon Wright
Christopher Barker wrote: > By the way, I know Greg Ewing was asked about better support for numpy > arrays in Pyrex, and he said "I'm *definitely* not going to > re-implement C++ templates!" -- is there talk of creating a way to write > extensions that could operate on numpy arrays of arbitrary

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

2008-02-15 Thread Jon Wright
David Cournapeau wrote: > Hi, > > My head hurt trying to understand dll management with windows. I > wanted to find a sane way to use dll for numscons, but I can't see how > to do this, so I was wondering if anyone on this ML had any deep > knowledge on how to install dll, and reuse them wi

Re: [Numpy-discussion] C Extensions, CTypes and "external code & libraries"

2008-02-12 Thread Jon Wright
Lou Pecora wrote: >... This appears to be the way > static and shared libraries work, especially on Mac OS > X, maybe elsewhere. Have you tried linking against a GSL static library? I don't have a mac, but most linkers only pull in the routines you need. For example, using windows and mingw:

Re: [Numpy-discussion] casting

2008-01-14 Thread Jon Wright
> I'm sorry, I still think we're talking past each other. What do you mean by > "native data type"? If you just want to get an ndarray without specifying a > type, use PyArray_FROM_O(). That's what it's for. You don't need to know the > data type beforehand. What I have wanted in the past (and

[Numpy-discussion] GPU blas with numpy?

2007-12-06 Thread Jon Wright
Hello, Does anyone have any experience with numpy and using a GPU? eg: http://developer.nvidia.com/object/cuda.html ...they seem to have a GPU based blas available. Thanks for any info, Jon ___ Numpy-discussion mailing list Numpy-discussion@scipy.or

[Numpy-discussion] numpy.put as increment?

2007-11-28 Thread Jon Wright
Hello everyone, I am trying to sum points onto a 3d grid using "put" with a list of computed array indices. I am looking for a version of "put" which increments, e.g. replace: for i in ind: a.flat[i] = v[i] with "+=" to increment. Other operations might also be useful? I tried using "take

Re: [Numpy-discussion] Radix sort?

2007-06-20 Thread Jon Wright
> "Charles R Harris" <[EMAIL PROTECTED]> wrote: > > Straight radix sort might be an interesting option for some things. > However, its performance can depend on whether the input data is random or > not and it takes up more space than merge sort. Other potential drawbacks > arise from the bit twi

[Numpy-discussion] Radix sort?

2007-06-19 Thread Jon Wright
Dear numpy experts, I see from the docs that there seem to be 3 sorting algorithms for array data (quicksort, mergesort and heapsort). After hearing a rumour about radix sorts and floats I google'd and now I'm wondering about a radix sort for numpy (and Numeric) scalars? See: http://www.stereo

Re: [Numpy-discussion] How to tell numpy to use gfortran as a, compiler

2007-02-28 Thread Jon Wright
>Date: Sun, 25 Feb 2007 15:43:03 +0100 (CET) >From: "Sturla Molden" <[EMAIL PROTECTED]> >Subject: Re: [Numpy-discussion] How to tell numpy to use gfortran as a > compiler ? >Content-Type: text/plain;charset=iso-8859-1 > > [...] >There is a third Fortran compiler based on the GCC backend c