Re: [Numpy-discussion] [ANN] Cython 0.15

2011-08-09 Thread Robert Bradshaw
On Mon, Aug 8, 2011 at 9:46 AM, Christopher Barker wrote: > On 8/8/11 1:21 AM, Sebastian Haase wrote: > >> b) What is the status of supporting multi-type Cython functions -- ala >> C++ templates ? > > You might want to take a look at what Keith Goodman has done with the > "Bottleneck" project -- I

Re: [Numpy-discussion] how to compile Fortran using setup.py

2011-03-14 Thread Robert Bradshaw
On Mon, Mar 14, 2011 at 1:44 PM, Ondrej Certik wrote: > Hi Pearu! > > On Sat, Mar 12, 2011 at 2:30 AM, Pearu Peterson > wrote: >> >> >> On Fri, Mar 11, 2011 at 3:58 AM, Ondrej Certik wrote: >>> >>> Hi, >>> >>> I spent about an hour googling and didn't figure this out. Here is my >>> setup.py: >>

Re: [Numpy-discussion] [cython-users] errors with numpy 1.5.1

2011-03-08 Thread Robert Bradshaw
On Fri, Mar 4, 2011 at 4:19 PM, Choy wrote: > Hello -- > > I recently upgraded from python 2.6 -> 2.7, cython 0.13 -> 14.1, and > numpy 1.4.1 -> 1.5.1.  Unfortunately, one of my cython modules no > longer works. > > I tracked my bug and used the web to see that there is already a > ticket for exac

Re: [Numpy-discussion] rewriting NumPy code in C or C++ or similar

2011-03-07 Thread Robert Bradshaw
On Mon, Mar 7, 2011 at 4:22 PM, Dan Halbert wrote: > On 3/7/2011 6:48 PM, Christopher Barker wrote: >> On 3/7/11 3:36 PM, Dan Halbert wrote: >>> We currently have some straightforward NumPy code that indirectly >>> implements a C API defined by a third party. We built a Cython layer that >>> dir

Re: [Numpy-discussion] NumPy C-API equivalent of np.float64()

2010-12-29 Thread Robert Bradshaw
On Wed, Dec 29, 2010 at 9:05 AM, Keith Goodman wrote: > On Tue, Dec 28, 2010 at 11:22 PM, Robert Bradshaw > wrote: >> On Tue, Dec 28, 2010 at 8:10 PM, John Salvatier >> wrote: >>> Wouldn't that be a cast? You do casts in Cython with (expression) >>> and

Re: [Numpy-discussion] Optimization suggestion sought

2010-12-29 Thread Robert Bradshaw
On Mon, Dec 27, 2010 at 6:20 AM, Enzo Michelangeli wrote: > Many thanks to Josef and Justin for their replies. > > Josef's hint sounds like a good way of reducing peak memory allocation > especially when the row size is large, which makes the "for" overhead for > each iteration comparatively lower

Re: [Numpy-discussion] NumPy C-API equivalent of np.float64()

2010-12-28 Thread Robert Bradshaw
On Tue, Dec 28, 2010 at 8:10 PM, John Salvatier wrote: > Wouldn't that be a cast? You do casts in Cython with (expression) > and that should be the equivalent of float64 I think. Or even (expression) if you've cimported numpy (though as mentioned this is the same as double on every platform I kno

Re: [Numpy-discussion] A Cython apply_along_axis function

2010-12-01 Thread Robert Bradshaw
On Wed, Dec 1, 2010 at 6:09 PM, John Salvatier wrote: > On Wed, Dec 1, 2010 at 6:07 PM, Keith Goodman wrote: >> >> On Wed, Dec 1, 2010 at 5:53 PM, David wrote: >> >> > On 12/02/2010 04:47 AM, Keith Goodman wrote: >> >> It's hard to write Cython code that can handle all dtypes and >> >> arbitrary

[Numpy-discussion] Cython distutils

2010-09-13 Thread Robert Bradshaw
I've pushed an implementation of http://wiki.cython.org/enhancements/distutils_preprocessing . This allows one do write, e.g. module_list = cythonize("*.pyx") in your setup.py, and it handle the .pyx dependencies (including transitive dependence of libraries) and does all the .pyx -> .c trans

Re: [Numpy-discussion] [cython-users] ANN fwrap v0.1.0

2010-08-07 Thread Robert Bradshaw
Excellent news! May you get lots of users and (easy to address) bug reports. Sounds like it does a lot already. - Robert On Sat, Aug 7, 2010 at 5:33 PM, Kurt Smith wrote: > Fwrap v0.1.0 > > > I am pleased to announce the first release of Fwrap v0.1.0, a utility for > wrapping Fortr

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

2009-09-02 Thread Robert Bradshaw
On Wed, 2 Sep 2009, Dag Sverre Seljebotn wrote: > Sturla Molden wrote: >> Dag Sverre Seljebotn skrev: >> >>> Nitpick: This will fail on large arrays. I guess numpy.npy_intp is the >>> right type to use in this case? >>> >>> >> By the way, here is a more polished version, does it look ok? >> >> htt

Re: [Numpy-discussion] Optimized half-sizing of images?

2009-08-07 Thread Robert Bradshaw
On Aug 7, 2009, at 12:23 AM, Sebastian Haase wrote: > On Fri, Aug 7, 2009 at 3:46 AM, Zachary > Pincus wrote: >>> We have a need to to generate half-size version of RGB images as >>> quickly >>> as possible. >> >> How good do these need to look? You could just throw away every other >> pixel...

Re: [Numpy-discussion] Using __complex__ for complex dtype

2009-07-09 Thread Robert Bradshaw
Nevermind, I just found http://bugs.python.org/issue1675423 . On Jul 9, 2009, at 1:41 AM, Robert Bradshaw wrote: > I know using __complex__ has been discussed before, but it would be > really nice if it were at least used to convert object to the > complex dtypes. > > - Rob