Davoud Taghawi-Nejad
Davoud Taghawi-Nejad

Reputation: 16776

array passing between numpy and cython

I would like to pass an numpy array to cython. The Cython C type should be float. Which numpy type do I have to choose. When I choose float or np.float, then its actually a C double.

Upvotes: 0

Views: 58

Answers (1)

John Zwinck
John Zwinck

Reputation: 249123

You want np.float32. This is a 32-bit C float.

Upvotes: 1

Related Questions