get_numpy_type_char.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_BINDINGS_PYTHON_GET_NUMPY_TYPE_CHAR_HPP
14 #define MLPACK_BINDINGS_PYTHON_GET_NUMPY_TYPE_CHAR_HPP
15 
16 #include <mlpack/prereqs.hpp>
17 
18 namespace mlpack {
19 namespace bindings {
20 namespace python {
21 
22 template<typename T>
23 inline std::string GetNumpyTypeChar()
24 {
25  return "?";
26 }
27 
28 // size_t = s.
29 template<>
30 inline std::string GetNumpyTypeChar>()
31 {
32  return "s";
33 }
34 
35 template<>
36 inline std::string GetNumpyTypeChar>()
37 {
38  return "s";
39 }
40 
41 template<>
42 inline std::string GetNumpyTypeChar>()
43 {
44  return "s";
45 }
46 
47 // double = d.
48 template<>
49 inline std::string GetNumpyTypeChar()
50 {
51  return "d";
52 }
53 
54 template<>
55 inline std::string GetNumpyTypeChar()
56 {
57  return "d";
58 }
59 
60 template<>
61 inline std::string GetNumpyTypeChar()
62 {
63  return "d";
64 }
65 
66 } // namespace python
67 } // namespace bindings
68 } // namespace mlpack
69 
70 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
python
Definition: CMakeLists.txt:6