[Numpy-discussion] A. Martelli on Numeric/Numpy

2006-06-30 Thread Mark Heslep
FYI, posted Sunday on python: "...even if the hard-core numeric-python people are all evangelizing for migration to numpy (for reasons that are of course quite defensible!), I think it's quite OK to stick with good old Numeric for the moment (and that's exactly what I do for my own personal use!)"

[Numpy-discussion] Numpy subversion compatibility with Scipy release?

2006-07-07 Thread Mark Heslep
Is there any general sync point with development Numpy from subversion and the SciPy releases? Ive got Numpy 0.9.9.2761 and Scipy 0.4.9 installed with (I believe several) breakages, in particular: > In [8]: from scipy import special ... > /usr/lib/python2.4/site-packages/scipy/linalg/basic.py >

Re: [Numpy-discussion] OptimizationDemo [was: Numpy subversion compatibility with Scipy release? ]

2006-07-07 Thread Mark Heslep
Robert Kern wrote: > > The latest SVN revisions should match (it's a bug, otherwise). numpy 2761 is > recent enough that an SVN checkout of scipy will probably be fine. > Yes SVN scipy/numpy fix the problem. Sorry, I missed Travis's post on scipy-user here: http://projects.scipy.org/pipermail/

Re: [Numpy-discussion] OptimizationDemo [was: Numpy subversion compatibility with Scipy release? ] RESOLVED

2006-07-07 Thread Mark Heslep
repos also work together for Demo1. Mark Robert Kern wrote: > Mark Heslep wrote: > >> Robert Kern wrote: >> >>> The latest SVN revisions should match (it's a bug, otherwise). numpy 2761 >>> is >>> recent enough that an SVN checkout of sci

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

2006-07-12 Thread Mark Heslep
I don't see a clean way to create a numpy array from a ctypes pointer object. Is the __array_interface_ in ctypes the thing thats missing needed to make this happen? I've followed Albert's Scipy cookbook on ctypes here http://www.scipy.org/Cookbook/Ctypes <-- getting dated now for numpy SVN b

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

2006-07-12 Thread Mark Heslep
Travis Oliphant wrote: > Mark Heslep wrote: >> I don't see a clean way to create a numpy array from a ctypes pointer >> object. Is the __array_interface_ in ctypes the thing thats missing >> needed to make this happen? I've followed Albert's Scipy cookbo

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

2006-07-12 Thread Mark Heslep
Travis Oliphant wrote: > The problem here is that from Python NumPy has no way to create an > ndarray from a pointer. Doing this creates a situtation where it is > unclear who owns the memory. It is probably best to wrap the pointer > into some kind of object exposing the buffer protocol and

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

2006-07-12 Thread Mark Heslep
Albert Strasheim wrote: > 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

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

2006-07-25 Thread Mark Heslep
Christopher Barker wrote: > Lars Friedrich wrote: > >> I would like to work with some data using python/numpy. The data is >> generated with C. To bring the data from C to python, I would like to >> use ctype. I am using python 2.4.3 on a windows-System. >> >> To accomplish the described task, I

[Numpy-discussion] Fastest binary threshold?

2006-08-02 Thread Mark Heslep
I need a binary threshold and numpy.where() seems very slow on numpy 0.9.9.2800: python -m timeit -n 10 -s "import numpy as n;a=n.ones((512,512), n.uint8)*129" "a_bin=n.where( a>128, 128,0)" 10 loops, best of 3: 37.9 msec per loop I'm thinking the conversion of the min, max constants from py

Re: [Numpy-discussion] Fastest binary threshold?

2006-08-03 Thread Mark Heslep
Stefan van der Walt wrote: > Binary thresholding can be added to ndimage easily, if further speed > improvement is needed. > > Regards > Stéfan Yes Id like to become involved in that effort. Whats the status of ndimage now? Has it all been brought over from numarray and placed, where? Is ther