On 1/27/2009 6:03 AM, Jochen wrote:
BTW memmap arrays have
the same problem
if I create a memmap array and later do something like
a=a+1
all later changes will not be written to the file.
= is Python's rebinding operator.
a = a + 1 rebinds a to a different object.
As for ndarray's, I'd
On 1/27/2009 1:26 AM, Jochen wrote:
a = fftw3.AlignedArray(1024,complex)
a = a+1
= used this way is not assignment, it is name binding.
It is easy to use function's like fftw_malloc with NumPy:
import ctypes
import numpy
fftw_malloc = ctypes.cdll.fftw.fftw_malloc
fftw_malloc.argtypes =
On 1/27/2009 12:37 PM, Sturla Molden wrote:
address = fftw_malloc(N * d.nbytes) # restype = ctypes.c_ulong
if (address = 0):
if (address == ): raise MemoryError, 'fftw_malloc returned NULL'
Sorry for the typo.
S.M.
___
On 1/27/2009 12:37 PM, Sturla Molden wrote:
It is easy to use function's like fftw_malloc with NumPy:
Besides this, if I were to write a wrapper for FFTW in Python, I would
consider wrapping FFTW's Fortran interface with f2py.
It is probably safer, as well as faster, than using ctypes. It
Hi,
I have the following question, that I could not find an answer to in the
example list, or by googling:
I have a record array with dtype such as:
dtype([('times', 'f8'), ('sensors', '|S8'), ('prop1', 'f8'), ('prop2',
'f8'), ('prop3', 'f8'), ('prop4', 'f8')])
I would now like to calculate
On 1/27/2009 12:37 PM, Sturla Molden wrote:
import ctypes
import numpy
fftw_malloc = ctypes.cdll.fftw.fftw_malloc
fftw_malloc.argtypes = [ctypes.c_ulong,]
fftw_malloc.restype = ctypes.c_ulong
def aligned_array(N, dtype):
d = dtype()
address = fftw_malloc(N * d.nbytes) #
Hi,
I have been having trouble with the PyArray_Zeros/PyArray_ZEROS functions. I
cannot seem to create an array using these functions.
resultArray = PyArray_ZEROS(otherArray-nd, otherArray-dimensions,
NPY_DOUBLE, 0);
I would have thought this would have created an array the same shape as the
Hanno Klemm wrote:
Hi,
I have the following question, that I could not find an answer to in the
example list, or by googling:
I have a record array with dtype such as:
dtype([('times', 'f8'), ('sensors', '|S8'), ('prop1', 'f8'), ('prop2',
'f8'), ('prop3', 'f8'), ('prop4', 'f8')])
I would
On Tue, 2009-01-27 at 12:37 +0100, Sturla Molden wrote:
On 1/27/2009 1:26 AM, Jochen wrote:
a = fftw3.AlignedArray(1024,complex)
a = a+1
= used this way is not assignment, it is name binding.
It is easy to use function's like fftw_malloc with NumPy:
import ctypes
import numpy
On Tue, 2009-01-27 at 14:16 +0100, Sturla Molden wrote:
On 1/27/2009 12:37 PM, Sturla Molden wrote:
import ctypes
import numpy
fftw_malloc = ctypes.cdll.fftw.fftw_malloc
fftw_malloc.argtypes = [ctypes.c_ulong,]
fftw_malloc.restype = ctypes.c_ulong
def aligned_array(N, dtype):
Pierre (or anyone else who cares to chime in),
I'm using stack_arrays to combine data from two different files into a single
array. In one of these files, the data from one entire record comes back
missing, which, thanks to your recent change, ends up having a boolean dtype.
There is actual data
[Some background: we're talking about numpy.lib.recfunctions, a set of
functions to manipulate structured arrays]
Ryan,
If the two files have the same structure, you can use that fact and
specify the dtype of the output directly with the dtype parameter of
mafromtxt. That way, you're sure
Hi all,
a make latex in numpy/doc failed with
...
Intersphinx hit: PyObject
http://docs.python.org/dev/c-api/structures.html
writing... Sphinx error:
too many nesting section levels for LaTeX, at heading:
numpy.ma.MaskedArray.__lt__
make: *** [latex] Fehler 1
I am using sphinxv0.5.1
BTW,
On Tue, 2009-01-27 at 14:16 +0100, Sturla Molden wrote:
def aligned_array(N, dtype):
d = dtype()
tmp = numpy.array(N * d.nbytes + 16, dtype=numpy.uint8)
address = tmp.__array_interface__['data'][0]
offset = (16 - address % 16) % 16
return
On Jan 27, 2009, at 4:23 PM, Ryan May wrote:
I definitely wouldn't advocate magic by default, but I think it
would be nice to
be able to get the functionality if one wanted to.
OK. Put on the TODO list.
There is one problem I
noticed, however. I found common_type and lib.mintypecode,
Hi ~
I'm trying to build numpy (hopefully eventually scipy with the same
setup) with the Intel compilers (and Intel MKL) on the WinXP 64-bit
platform. Finding / linking to the Intel MKL seems to be successful (see
below) but I have an issue with the settings defined somewhere in the
various
Thanks for your response. I manually edited one of the python files
(ccompiler.py I think) to change icc.exe to icl.exe. (This is a trick I used
to use to get F2PY to compile on Windows platforms.) Since icl is a drop-in
replacement for the visual studio compiler / linker, I'd like to edit the
17 matches
Mail list logo