Mercurial > hg > vampy
comparison PyTypeConversions.h @ 74:e7d03f88ef43 vampyhost
Float vector conversion
author | Chris Cannam |
---|---|
date | Mon, 24 Nov 2014 16:22:41 +0000 |
parents | 76355b91cd92 |
children |
comparison
equal
deleted
inserted
replaced
73:76355b91cd92 | 74:e7d03f88ef43 |
---|---|
101 PyObject *PyValue_From_StringVector(const std::vector<std::string> &) const; | 101 PyObject *PyValue_From_StringVector(const std::vector<std::string> &) const; |
102 | 102 |
103 // Numpy types | 103 // Numpy types |
104 #ifdef HAVE_NUMPY | 104 #ifdef HAVE_NUMPY |
105 std::vector<float> PyArray_To_FloatVector (PyObject *pyValue) const; | 105 std::vector<float> PyArray_To_FloatVector (PyObject *pyValue) const; |
106 PyObject *FloatVector_To_PyArray(const std::vector<float> &) const; // Copying the data | |
106 #endif | 107 #endif |
107 | 108 |
108 /// Convert DTYPE type 1D NumpyArray to std::vector<RET> | 109 /// Convert DTYPE type 1D NumpyArray to std::vector<RET> |
109 template<typename RET, typename DTYPE> | 110 template<typename RET, typename DTYPE> |
110 std::vector<RET> PyArray_Convert(void* raw_data_ptr, long length, size_t strides) const | 111 std::vector<RET> PyArray_Convert(void* raw_data_ptr, long length, size_t strides) const |