Discussion:
[Pyublas] ambiguity problem
Neal Becker
2010-06-12 01:24:32 UTC
Permalink
This line:
out_t out (size, 0);

Causes this warning:
fft3.cc: In function 'out_t do_pad(const in_t&, size_t, bool) [with out_t =
pyublas::numpy_vector<std::complex<double> >, in_t =
pyublas::numpy_strided_vector<std::complex<double> >]':

fft3.cc:75: warning: ISO C++ says that these are ambiguous, even though the
worst conversion for the first is better than the worst conversion for the
second:
/usr/lib64/python2.6/site-packages/PyUblas-0.93.1-py2.6-linux-
x86_64.egg/include/pyublas/numpy.hpp:741: note: candidate 1:
pyublas::numpy_vector<T>::numpy_vector(int, const npy_intp*) [with T =
std::complex<double>]
/usr/lib64/python2.6/site-packages/PyUblas-0.93.1-py2.6-linux-
x86_64.egg/include/pyublas/numpy.hpp:760: note: candidate 2:
pyublas::numpy_vector<T>::numpy_vector(typename
boost::numeric::ublas::vector<T, pyublas::numpy_array<T> >::size_type, const
typename boost::numeric::ublas::vector<T, pyublas::numpy_array<T>
::value_type&) [with T = std::complex<double>]
Not sure what we should do about it.
Andreas Kloeckner
2010-06-19 22:29:47 UTC
Permalink
Post by Neal Becker
out_t out (size, 0);
fft3.cc: In function 'out_t do_pad(const in_t&, size_t, bool) [with out_t =
pyublas::numpy_vector<std::complex<double> >, in_t =
fft3.cc:75: warning: ISO C++ says that these are ambiguous, even though the
worst conversion for the first is better than the worst conversion for the
/usr/lib64/python2.6/site-packages/PyUblas-0.93.1-py2.6-linux-
pyublas::numpy_vector<T>::numpy_vector(int, const npy_intp*) [with T =
std::complex<double>]
/usr/lib64/python2.6/site-packages/PyUblas-0.93.1-py2.6-linux-
pyublas::numpy_vector<T>::numpy_vector(typename
boost::numeric::ublas::vector<T, pyublas::numpy_array<T> >::size_type, const
typename boost::numeric::ublas::vector<T, pyublas::numpy_array<T>
::value_type&) [with T = std::complex<double>]
Not sure what we should do about it.
Maybe the (ndim, dims) version should become a free function instead?
How much code are we breaking if we do that?

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/pyublas/attachments/20100619/02ba4573/attachment.pgp>
Loading...