get_numpy_type.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_BINDINGS_PYTHON_GET_NUMPY_TYPE_HPP
13 #define MLPACK_BINDINGS_PYTHON_GET_NUMPY_TYPE_HPP
14 
15 #include <mlpack/prereqs.hpp>
16 
17 namespace mlpack {
18 namespace bindings {
19 namespace python {
20 
21 template<typename T>
22 inline std::string GetNumpyType()
23 {
24  return "unknown"; // Not sure...
25 }
26 
27 template<>
28 inline std::string GetNumpyType<double>()
29 {
30  return "np.double";
31 }
32 
33 template<>
34 inline std::string GetNumpyType<size_t>()
35 {
36  return "np.intp";
37 }
38 
39 } // namespace python
40 } // namespace bindings
41 } // namespace mlpack
42 
43 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
std::string GetNumpyType< size_t >()
python
Definition: CMakeLists.txt:7
std::string GetNumpyType< double >()