diff --git a/CEP/PyBDSM/src/c++/MGFunction1.cc b/CEP/PyBDSM/src/c++/MGFunction1.cc index bdfab91b1e844cf2c45ecaca72c821315034698a..9aacf8e516e234c9be727e9c68d5b6a5ac316eea 100644 --- a/CEP/PyBDSM/src/c++/MGFunction1.cc +++ b/CEP/PyBDSM/src/c++/MGFunction1.cc @@ -106,7 +106,7 @@ void MGFunction::py_remove_gaussian(int idx) // // Get gaussian parameters by index // -tuple MGFunction::py_get_gaussian(int idx) +boost::python::tuple MGFunction::py_get_gaussian(int idx) { if (idx < 0) idx += m_gaul.size(); @@ -116,7 +116,7 @@ tuple MGFunction::py_get_gaussian(int idx) vector<double> &p = m_parameters[idx]; - return make_tuple(p[0], p[1], p[2], p[3], p[4], p[5]); + return boost::python::make_tuple(p[0], p[1], p[2], p[3], p[4], p[5]); } // @@ -171,7 +171,7 @@ list MGFunction::py_get_errors() for (unsigned i = 0; i < m_gaul.size(); ++i) { vector<double> &e = m_errors[i]; - res.append(make_tuple(e[0], e[1], e[2], e[3], e[4], e[5])); + res.append(boost::python::make_tuple(e[0], e[1], e[2], e[3], e[4], e[5])); } return res; @@ -180,7 +180,7 @@ list MGFunction::py_get_errors() // // Find highest peak in the data-MGFunction residual // -tuple MGFunction::py_find_peak() +boost::python::tuple MGFunction::py_find_peak() { vector<double> buf(data_size()); fcn_diff(&buf.front()); @@ -197,7 +197,7 @@ tuple MGFunction::py_find_peak() int x1 = mm_data[pidx].x1; int x2 = mm_data[pidx].x2; - return make_tuple(peak, make_tuple(x1, x2)); + return boost::python::make_tuple(peak, boost::python::make_tuple(x1, x2)); } diff --git a/CEP/PyBDSM/src/c++/MGFunction2.cc b/CEP/PyBDSM/src/c++/MGFunction2.cc index aff1746c20199765f3a7810fa875a665a764dbc0..3f6e139b74dd2b1ac48ce7cdea44e6d833fd5ad2 100644 --- a/CEP/PyBDSM/src/c++/MGFunction2.cc +++ b/CEP/PyBDSM/src/c++/MGFunction2.cc @@ -62,7 +62,7 @@ void MGFunction::get_parameters(double *buf) const { double *chk = buf; for (unsigned i = 0; i < m_gaul.size(); ++i) { - copy_n(m_parameters[i].begin(), m_gaul[i], buf); + std::copy_n(m_parameters[i].begin(), m_gaul[i], buf); buf += m_gaul[i]; } assert(buf - chk == (int)m_npar); @@ -76,7 +76,7 @@ void MGFunction::set_parameters(const double *buf) { const double *chk = buf; for(unsigned i = 0; i < m_gaul.size(); ++i) { - copy_n(buf, m_gaul[i], m_parameters[i].begin()); + std::copy_n(buf, m_gaul[i], m_parameters[i].begin()); buf += m_gaul[i]; } assert(buf - chk == (int)m_npar); @@ -90,7 +90,7 @@ void MGFunction::get_nlin_parameters(double *buf) const { double *chk = buf; for (unsigned i = 0; i < m_gaul.size(); ++i) { - copy_n(m_parameters[i].begin() + 1, m_gaul[i] - 1, buf); + std::copy_n(m_parameters[i].begin() + 1, m_gaul[i] - 1, buf); buf += m_gaul[i] - 1; } assert(buf - chk == (int)(m_npar - m_gaul.size())); @@ -104,7 +104,7 @@ void MGFunction::set_nlin_parameters(const double *buf) { const double *chk = buf; for(unsigned i = 0; i < m_gaul.size(); ++i) { - copy_n(buf, m_gaul[i] - 1, m_parameters[i].begin() + 1); + std::copy_n(buf, m_gaul[i] - 1, m_parameters[i].begin() + 1); buf += m_gaul[i] - 1 ; } assert(buf - chk == (int)(m_npar - m_gaul.size())); diff --git a/CEP/PyBDSM/src/c++/stat.cc b/CEP/PyBDSM/src/c++/stat.cc index 15ef128032e44b3e737c05b51240687471509ee4..1220a250ed9a4ec02696ec3afc9c8d27c36c2f21 100644 --- a/CEP/PyBDSM/src/c++/stat.cc +++ b/CEP/PyBDSM/src/c++/stat.cc @@ -229,7 +229,7 @@ static object _bstat(numeric::array arr, object mask, double kappa) /* py_assert(res.second == dev.back(), PyExc_RuntimeError, "clipped rRMS calculation does not converge"); */ - return make_tuple(mean[1], dev[1], mean.back(), dev.back(), cnt); + return boost::python::make_tuple(mean[1], dev[1], mean.back(), dev.back(), cnt); } object bstat(numeric::array arr, object mask, double kappa) @@ -264,5 +264,5 @@ object bstat(numeric::array arr, object mask, double kappa) fail: py_assert(false, PyExc_RuntimeError, "bstat dispatch failed: not implemented for this datatype/layout"); - return tuple(); // this is fake return-statement to silence the compiler + return boost::python::tuple(); // this is fake return-statement to silence the compiler }