450 std::tuple
>>::type* = 0) 453 const std::string prefix(indent,
' ');
466 std::cout << prefix <<
"cdef np.ndarray " << d.
name <<
"_dims" << std::endl;
467 std::cout << prefix <<
"# Detect if the parameter was passed; set if so." 471 std::cout << prefix <<
"if " << d.
name <<
" is not None:" << std::endl;
472 std::cout << prefix <<
" " << d.
name <<
"_tuple = to_matrix_with_info(" 473 << d.
name <<
", dtype=np.double, copy=IO.HasParam('copy_all_inputs'))" 475 std::cout << prefix <<
" if len(" << d.
name <<
"_tuple[0].shape" 476 <<
") < 2:" << std::endl;
477 std::cout << prefix <<
" " << d.
name <<
"_tuple[0].shape = (" << d.
name 478 <<
"_tuple[0].shape[0], 1)" << std::endl;
479 std::cout << prefix <<
" " << d.
name <<
"_mat = arma_numpy.numpy_to_mat_d(" 480 << d.
name <<
"_tuple[0], " << d.
name <<
"_tuple[1])" << std::endl;
481 std::cout << prefix <<
" " << d.
name <<
"_dims = " << d.
name 482 <<
"_tuple[2]" << std::endl;
483 std::cout << prefix <<
" SetParamWithInfo[arma.Mat[double]]( 484 <<
"string> '" << d.
name <<
"', dereference(" << d.
name <<
"_mat), " 485 <<
" " << d.
name <<
"_dims.data)" << std::endl;
486 std::cout << prefix <<
" IO.SetPassed( '" << d.
name 487 <<
"')" << std::endl;
488 std::cout << prefix <<
" del " << d.
name <<
"_mat" << std::endl;
492 std::cout << prefix << d.
name <<
"_tuple = to_matrix_with_info(" << d.
name 493 <<
", dtype=np.double, copy=IO.HasParam('copy_all_inputs'))" 495 std::cout << prefix <<
"if len(" << d.
name <<
"_tuple[0].shape" 496 <<
") < 2:" << std::endl;
497 std::cout << prefix <<
" " << d.
name <<
"_tuple[0].shape = (" << d.
name 498 <<
"_tuple[0].shape[0], 1)" << std::endl;
499 std::cout << prefix << d.
name <<
"_mat = arma_numpy.numpy_to_mat_d(" 500 << d.
name <<
"_tuple[0], " << d.
name <<
"_tuple[1])" << std::endl;
501 std::cout << prefix << d.
name <<
"_dims = " << d.
name <<
"_tuple[2]" 503 std::cout << prefix <<
"SetParamWithInfo[arma.Mat[double]]( 504 <<
"string> '" << d.
name <<
"', dereference(" << d.
name <<
"_mat), " 505 <<
" " << d.
name <<
"_dims.data)" << std::endl;
506 std::cout << prefix <<
"IO.SetPassed( '" << d.
name <<
"')" 508 std::cout << prefix <<
"del " << d.
name <<
"_mat" << std::endl;
510 std::cout << std::endl;
529 PrintInputProcessing
::type>(d, void PrintInputProcessing(util::ParamData &d, const size_t indent, const typename boost::disable_if< util::IsStdVector< T >>::type *=0, const typename boost::disable_if< arma::is_arma_type< T >>::type *=0, const typename boost::disable_if< data::HasSerialize< T >>::type *=0, const typename boost::disable_if< std::is_same< T, std::tuple< data::DatasetInfo, arma::mat >>>::type *=0)
Print input processing for a standard option type.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
This structure holds all of the information about a single parameter, including its value (which is s...
Metaprogramming structure for vector detection.
std::string name
Name of this parameter.
bool required
True if this option is required.
void StripType(const std::string &inputType, std::string &strippedType, std::string &printedType, std::string &defaultsType)
Given an input type like, e.g., "LogisticRegression<>", return three types that can be used in Python...
std::string cppType
The true name of the type, as it would be written in C++.
if(NOT BUILD_GO_SHLIB) macro(add_go_binding name) endmacro() return() endif() endmacro() macro(post_go_setup) if(BUILD_GO_BINDINGS) file(APPEND "$