On 23 Feb 2007 21:19:05 +, Alexander Schmolck <[EMAIL PROTECTED]>
wrote:
Hi,
I'm currently puzzling over how to best convert (column major order)
matlab
arrays to numpy arrays and vice versa -- I'm looking for a solution that's
simple, general and reasonably fast -- being also applicable to
Hi,
I'm currently puzzling over how to best convert (column major order) matlab
arrays to numpy arrays and vice versa -- I'm looking for a solution that's
simple, general and reasonably fast -- being also applicable to Numeric arrays
would be a plus (I'd like to retain Numeric compatibility for th
On Friday 23 February 2007 14:53:05 Zachary Pincus wrote:
> Scipy's ndimage module has a function that takes a generic callback
> and calls it with the values of each neighborhood (of a given size,
> and optionally with a particular "mask" footprint) centered on each
> array element. That function
Scipy's ndimage module has a function that takes a generic callback
and calls it with the values of each neighborhood (of a given size,
and optionally with a particular "mask" footprint) centered on each
array element. That function handles boundary conditions, etc nicely.
Unfortunately, I'm
On Fri, 2007-02-23 at 17:38 +0100, [EMAIL PROTECTED] wrote:
> Hi,
>
> Given a (possibly masked) 2d array x, is there a fast(er) way in Numpy to
> obtain
> the same result as the following few lines?
>
> d = 1 # neighbourhood 'radius'
> Nrow = x.shape[0]
> Ncol =
A Divendres 23 Febrer 2007 17:38, [EMAIL PROTECTED] escrigué:
> Hi,
>
> Given a (possibly masked) 2d array x, is there a fast(er) way in Numpy to
> obtain the same result as the following few lines?
>
> d = 1 # neighbourhood 'radius'
> Nrow = x.shape[0]
> Ncol = x.s
On 23/02/07, Alexander Michael <[EMAIL PROTECTED]> wrote:
> I still find the ring buffer solution appealing, but I did not see a
> way to stack two arrays together without creating copies. Am I missing
> a bit of numpy cleverness?
The short answer is no; the stride in memory from one element to t
Hi,
Given a (possibly masked) 2d array x, is there a fast(er) way in Numpy to obtain
the same result as the following few lines?
d = 1 # neighbourhood 'radius'
Nrow = x.shape[0]
Ncol = x.shape[1]
y = array([[x[i-d:i+d+1,j-d:j+d+1].ravel() for j in range(d,Ncol-d)]
Timothy's refinement of Anne's idea will work for me:
>>> import timeit
>>> print '%.2fms/push' % (1000 * timeit.Timer(
..."a[...,:-1] = a[...,1:]",
..."from numpy import empty; a = empty((5000,20,1000))"
...).timeit(number=10)/10)
537.86ms/push
I still find the ring buffer solution
Given :
AIX 5.3
xlf v10.1
python 2.5
numpy 1.0.1
Task:
Building/installaing numpy on AIX 5.3
Problem:
The install process can not determine the IBM Fortran compiler
Running python ./numpy/distutils/fcompiler/ibm.py gives pretty much
garbage on the screen and the resolut is 'None' .
So i cha
10 matches
Mail list logo