Hi,
I am working on a Python extension module using of the NumPy C-API. The
extension module is an interface to an image processing and analysis
library written in C++. The C++ functions are exported with
boos::python. Currently I am implementing the support of
three-dimensional data sets
Dear list,
is nonzero the appropriate function to get the indexes of a boolean array?
foo = numpy.random.random(1)
cut = foo .5
indexes = cut.nonzero()[0]
Another question: Why is the the type returned by nonzero a tuple and not an
ndarray of the same shape as the input (or self if used on
Timothy Hochberg wrote:
On 10/25/07, *Oliver Kranz* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
wrote:
Hi,
I am working on a Python extension module using of the NumPy C-API. The
extension module is an interface to an image processing and analysis
library written in
I am working on an example to illustrate convolution in the temporal
and spectral domains, using the property that a convolution in the
time domain is a multiplication in the fourier domain. I am using
numpy.fft and numpy.convolve to compute the solution two ways, and
comparing them. I am
Hi John
The signals should be zero-padded, otherwise you get circular convolution:
F = npy.fft.fft(r,len(r)+len(x)-1)
X = npy.fft.fft(x,len(r)+len(x)-1)
Y = F*X
yi = npy.fft.ifft(Y)[:len(x)].real
Also take a look at fftconv.
Regards
Stéfan
On Thu, Oct 25, 2007 at 01:00:29PM -0500, John Hunter
Hallo!
I have the following problem: I get a data array in column major storage
order and want to use it as numpy array without copying data.
Therefore I do the following (2D example):
obj = PyArray_FromDimsAndData(2, dim0, PyArray_DOUBLE, (char*)data);
PyArrayObject *tmp =
Anybody know of any tricks for handling something like
z[0]=1.0
for i in range(100):
out[i]=func1(z[i])
z[i+1]=func2(out[i])
??
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
Oliver Kranz wrote:
Hi,
I am working on a Python extension module using of the NumPy C-API. The
extension module is an interface to an image processing and analysis
library written in C++. The C++ functions are exported with
boos::python. Currently I am implementing the support of