Home
Get Started
Documentation
Community
Google Summer of Code
FAQ
GitHub
Home
Get Started
Documentation
Community
Google Summer of Code
FAQ
GitHub
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
mlpack
strip_type.hpp
Definition:
add_to_po.hpp:21
prereqs.hpp
The core includes that mlpack expects; standard C++ includes and Armadillo.
mlpack::bindings::python::GetNumpyType< size_t >
std::string GetNumpyType< size_t >()
Definition:
get_numpy_type.hpp:34
python
python
Definition:
CMakeLists.txt:5
mlpack::bindings::python::GetNumpyType< double >
std::string GetNumpyType< double >()
Definition:
get_numpy_type.hpp:28
mlpack::bindings::python::GetNumpyType
std::string GetNumpyType()
Definition:
get_numpy_type.hpp:22