Hello,
I tried the following:
### start code
a = N.random.rand(100)
myFile = file('test.bin', 'wb')
for i in range(100):
a.tofile(myFile)
myFile.close()
### end code
And this gives roughly 50 MB/s on my office-machine but only 6.5 MB/s on
the machine that I was
Geoffrey Zhu wrote:
Hi,
I am about to write a C extension module. C functions in the module will
take and return numpy arrays. I found a tutorial online, but I am not
sure about the following:
I agree with others that ctypes might be your best path.
The codeGenerator is magic, if you
On Wed, Jul 25, 2007 at 06:38:55AM -0700, Ray Schumacher wrote:
The codeGenerator is magic, if you ask me:
http://starship.python.net/crew/theller/ctypes/old/codegen.html
Can it wrap code passing around arrays ? If so it really does magic that
I don't understand.
Gaƫl
On Wed, Jul 25, 2007 at 03:41:37PM +0200, Gael Varoquaux wrote:
On Wed, Jul 25, 2007 at 06:38:55AM -0700, Ray Schumacher wrote:
The codeGenerator is magic, if you ask me:
http://starship.python.net/crew/theller/ctypes/old/codegen.html
Can it wrap code passing around arrays ? If so it
On 7/25/07, Lars Friedrich [EMAIL PROTECTED] wrote:
Hello,
I tried the following:
### start code
a = N.random.rand(100)
myFile = file('test.bin', 'wb')
for i in range(100):
a.tofile(myFile)
myFile.close()
### end code
And this gives roughly 50 MB/s on my
On Wed, Jul 25, 2007 at 04:44:08PM +0200, Stefan van der Walt wrote:
On Wed, Jul 25, 2007 at 03:41:37PM +0200, Gael Varoquaux wrote:
On Wed, Jul 25, 2007 at 06:38:55AM -0700, Ray Schumacher wrote:
The codeGenerator is magic, if you ask me:
Hello all,
I just recently updated to the SVN version of numpy to test my code
against it, and found that a small change made to
numpy.get_printoptions (it now returns a dictionary instead of a
list) breaks my code.
Here's the changeset:
http://projects.scipy.org/scipy/numpy/changeset/3877
For example, it would be nice if outer
supported:
outer(b,c,output=a)
outer(b,c,increment=a)
outer(b,c,increment=a,scale=eps)
or maybe one could specify an accumulation ufunc, with addition,
multiplication, min, and max being fast, and with an optional scale
parameter.
What would the
Ray Schumacher wrote:
I agree with others that ctypes might be your best path.
Pyrex is a good bet too:
http://www.scipy.org/Cookbook/Pyrex_and_NumPy
The advantage with pyrex is that you don't have to write any C at all.
You will have to use a compiler that is compatible with your Python
Gael Varoquaux wrote:
On Wed, Jul 25, 2007 at 04:44:08PM +0200, Stefan van der Walt wrote:
On Wed, Jul 25, 2007 at 03:41:37PM +0200, Gael Varoquaux wrote:
On Wed, Jul 25, 2007 at 06:38:55AM -0700, Ray Schumacher wrote:
The codeGenerator is magic, if you ask me:
Geoffrey Zhu wrote:
Hi,
I am writing a function that would take a list of datetime objects and
a list of single letter characters (such as [A,B,C]). The number
of items tend to be big and both the list and the numpy array have all
the functionalities I need.
Do you think I should use
Hi,
I am writing a function that would take a list of datetime objects and
a list of single letter characters (such as [A,B,C]). The number
of items tend to be big and both the list and the numpy array have all
the functionalities I need.
Do you think I should use numpy arrays or the regular
12 matches
Mail list logo