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
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
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
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 the
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 =
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 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
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
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