How to do numpy's dtype?

From what I've seen floats and doubles have different levels of precision based on what computer you run/compile it on. I've also seen numpy's dtype. An example might be
 
np.empty([4, 2], dtype='float32')

I know it uses C/C++ natives so how do you say in C++
 
float32 a = 3.5f;

?
Last edited on
??

1.
NumPy supports a much greater variety of numerical types than Python does.



2. http://en.cppreference.com/w/cpp/language/types
... says that while integer types do vary, the floating point types usually follow IEEE-754z
I also meant things like float16. How does numpy achieve that? Also, I'm not concerned with Python but C.
Numpy is open source, is it not? Therefore, you can download and read the code.
Topic archived. No new replies allowed.