Re: [Numpy-discussion] Mapping of dtype to C types

2011-05-11 Thread Sturla Molden
Den 09.05.2011 15:58, skrev Keith Goodman: On Mon, May 9, 2011 at 1:46 AM, Pauli Virtanenp...@iki.fi wrote: Sun, 08 May 2011 14:45:45 -0700, Keith Goodman wrote: I'm writing a function that accepts four possible dtypes: int32, int64, float32, float64. The function will call a C extension

Re: [Numpy-discussion] Mapping of dtype to C types

2011-05-11 Thread Olivier Delalleau
2011/5/11 Sturla Molden stu...@molden.no Den 09.05.2011 15:58, skrev Keith Goodman: On Mon, May 9, 2011 at 1:46 AM, Pauli Virtanenp...@iki.fi wrote: Sun, 08 May 2011 14:45:45 -0700, Keith Goodman wrote: I'm writing a function that accepts four possible dtypes: int32, int64, float32,

Re: [Numpy-discussion] Mapping of dtype to C types

2011-05-11 Thread Bruce Southey
On Wed, May 11, 2011 at 2:07 PM, Olivier Delalleau sh...@keba.be wrote: 2011/5/11 Sturla Molden stu...@molden.no Den 09.05.2011 15:58, skrev Keith Goodman: On Mon, May 9, 2011 at 1:46 AM, Pauli Virtanenp...@iki.fi  wrote: Sun, 08 May 2011 14:45:45 -0700, Keith Goodman wrote: I'm writing a

Re: [Numpy-discussion] Mapping of dtype to C types

2011-05-09 Thread Pauli Virtanen
Sun, 08 May 2011 14:45:45 -0700, Keith Goodman wrote: I'm writing a function that accepts four possible dtypes: int32, int64, float32, float64. The function will call a C extension (wrapped in Cython). What are the equivalent C types? int, long, float, double, respectively? Will that work on

Re: [Numpy-discussion] Mapping of dtype to C types

2011-05-09 Thread Keith Goodman
On Mon, May 9, 2011 at 1:46 AM, Pauli Virtanen p...@iki.fi wrote: Sun, 08 May 2011 14:45:45 -0700, Keith Goodman wrote: I'm writing a function that accepts four possible dtypes: int32, int64, float32, float64. The function will call a C extension (wrapped in Cython). What are the equivalent C

[Numpy-discussion] Mapping of dtype to C types

2011-05-08 Thread Keith Goodman
I'm writing a function that accepts four possible dtypes: int32, int64, float32, float64. The function will call a C extension (wrapped in Cython). What are the equivalent C types? int, long, float, double, respectively? Will that work on all systems?

Re: [Numpy-discussion] Mapping of dtype to C types

2011-05-08 Thread John Salvatier
I want to add a question: is there a function that returns the name of the corresponding C type given the numpy type? On Sun, May 8, 2011 at 2:45 PM, Keith Goodman kwgood...@gmail.com wrote: I'm writing a function that accepts four possible dtypes: int32, int64, float32, float64. The function

Re: [Numpy-discussion] Mapping of dtype to C types

2011-05-08 Thread Nathaniel Smith
On Sun, May 8, 2011 at 2:45 PM, Keith Goodman kwgood...@gmail.com wrote: I'm writing a function that accepts four possible dtypes: int32, int64, float32, float64. The function will call a C extension (wrapped in Cython). What are the equivalent C types? int, long, float, double, respectively?