void assign( size_type count, const T& value ); | (1) | |
template< class InputIt > void assign( InputIt first, InputIt last ); | (2) | |
void assign( std::initializer_list<T> ilist ); | (3) | |
Error compiling Cython file:------------------------------------------------------------...cdef vector[double] _c_array_long_to_vector(double* array, int length):cdef vector[double] output_vectoroutput_vector.reserve(length)output_vector.assign(array, array + length)^------------------------------------------------------------cyemd/emd.pyx:58:30: Cannot assign type 'double *' to 'size_t'Error compiling Cython file:------------------------------------------------------------...cdef vector[double] _c_array_long_to_vector(double* array, int length):cdef vector[double] output_vectoroutput_vector.reserve(length)output_vector.assign(array, array + length)^------------------------------------------------------------cyemd/emd.pyx:58:38: Cannot assign type 'double *' to 'double'
--
---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hello, is this the way to do the conversion as of today? I'm wondering whether there exists a way that avoids data copies. Thanks, Pietro
--
---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
I'm not sure how GSL helps here. C arrays and GSL and NumPy and Cython
MemoryViews all play well together, but they all have the same issues
with C++ std::vector. If the API of your library you're trying to use
uses C++ vectors, you have to copy (or do something tricky with
allocators).
--
---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users+unsubscribe@googlegroups.com.