Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

static typing of mpf variables in cython


I am a new user of cython. I was looking for the static typing of python's mpf type variables in cython for speed up.

For example:

python: N=10 static typing in cython: cdef int N=10

Now I'm looking for the equivalent for mpf variables:

python: from mpmath import mpf , N = mpf(10)

cython: ??? maybe sth like: 'cdef mpf_t N=10' but this doesn't work.

Thank you,