mlpack 3.4.2
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
17namespace mlpack {
18namespace bindings {
19namespace python {
20
21template<typename T>
22inline std::string GetNumpyType()
23{
24 return "unknown"; // Not sure...
25}
26
27template<>
28inline std::string GetNumpyType<double>()
29{
30 return "np.double";
31}
32
33template<>
34inline std::string GetNumpyType<size_t>()
35{
36 return "np.intp";
37}
38
39} // namespace python
40} // namespace bindings
41} // namespace mlpack
42
43#endif
python
Definition: CMakeLists.txt:6
std::string GetNumpyType< double >()
std::string GetNumpyType< size_t >()
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The core includes that mlpack expects; standard C++ includes and Armadillo.