Neal Becker
2009-01-29 14:28:30 UTC
template<typename out_t, typename in_t>
inline out_t norm_2 (in_t const& in) {
return ublas::norm_2 (in);
}
[with out_t = double,
in_t = pyublas::numpy_strided_vector<std::complex<double> >]
Gives:
/usr/local/src/boost.hg/boost/numeric/ublas/vector_expression.hpp:1447: error:
no matching function for call to
'boost::numeric::ublas::vector_scalar_unary<boost::numeric::ublas::vector_slice<pyublas::numpy_vector<std::complex<double>
/usr/local/src/boost.hg/boost/numeric/ublas/vector_expression.hpp:1453: note:
candidates are: typename F::result_type
boost::numeric::ublas::vector_scalar_unary<E,
F>::evaluate(boost::numeric::ublas::dense_random_access_iterator_tag) const
[with E =
boost::numeric::ublas::vector_slice<pyublas::numpy_vector<std::complex<double>
.... more candidates....
Any ideas? Can't I use pyublas::numpy_strided_vector<T> anywhere
ublas::vector could be used? (I'm assuming the answer is the same if it was
pyublas::numpy_vector<T>)
inline out_t norm_2 (in_t const& in) {
return ublas::norm_2 (in);
}
[with out_t = double,
in_t = pyublas::numpy_strided_vector<std::complex<double> >]
Gives:
/usr/local/src/boost.hg/boost/numeric/ublas/vector_expression.hpp:1447: error:
no matching function for call to
'boost::numeric::ublas::vector_scalar_unary<boost::numeric::ublas::vector_slice<pyublas::numpy_vector<std::complex<double>
,
boost::numeric::ublas::vector_norm_2<boost::numeric::ublas::vector_slice<pyublas::numpy_vector<std::complex<double>::evaluate(std::random_access_iterator_tag) const'
candidates are: typename F::result_type
boost::numeric::ublas::vector_scalar_unary<E,
F>::evaluate(boost::numeric::ublas::dense_random_access_iterator_tag) const
[with E =
boost::numeric::ublas::vector_slice<pyublas::numpy_vector<std::complex<double>
, F =
boost::numeric::ublas::vector_norm_2<boost::numeric::ublas::vector_slice<pyublas::numpy_vector<std::complex<double>]
Any ideas? Can't I use pyublas::numpy_strided_vector<T> anywhere
ublas::vector could be used? (I'm assuming the answer is the same if it was
pyublas::numpy_vector<T>)