Mercurial > hg > vampy
comparison PyTypeInterface.h @ 77:5e26aaba2eed
Build fixes for MinGW32
author | Chris Cannam |
---|---|
date | Wed, 25 Feb 2015 14:05:47 +0000 |
parents | 5664fe298af2 |
children | ef4989f33648 |
comparison
equal
deleted
inserted
replaced
76:d8eaa10e153e | 77:5e26aaba2eed |
---|---|
326 rValue.push_back((RET)data[i]); | 326 rValue.push_back((RET)data[i]); |
327 } | 327 } |
328 return rValue; | 328 return rValue; |
329 } | 329 } |
330 | 330 |
331 #ifdef HAVE_NUMPY | |
331 /// this is a special case. numpy.float64 has an array interface but no array descriptor | 332 /// this is a special case. numpy.float64 has an array interface but no array descriptor |
332 inline std::vector<float> PyArray0D_Convert(PyArrayInterface *ai) const | 333 inline std::vector<float> PyArray0D_Convert(PyArrayInterface *ai) const |
333 { | 334 { |
334 std::vector<float> rValue; | 335 std::vector<float> rValue; |
335 if ((ai->typekind) == *"f") | 336 if ((ai->typekind) == *"f") |
341 #ifdef _DEBUG_VALUES | 342 #ifdef _DEBUG_VALUES |
342 cerr << "value: " << rValue[0] << endl; | 343 cerr << "value: " << rValue[0] << endl; |
343 #endif | 344 #endif |
344 return rValue; | 345 return rValue; |
345 } | 346 } |
346 | 347 #endif |
348 | |
347 //Vamp specific types | 349 //Vamp specific types |
348 Vamp::Plugin::FeatureSet PyValue_To_FeatureSet(PyObject*) const; | 350 Vamp::Plugin::FeatureSet PyValue_To_FeatureSet(PyObject*) const; |
349 inline void PyValue_To_rValue(PyObject *pyValue, Vamp::Plugin::FeatureSet &r) const | 351 inline void PyValue_To_rValue(PyObject *pyValue, Vamp::Plugin::FeatureSet &r) const |
350 { r = this->PyValue_To_FeatureSet(pyValue); } | 352 { r = this->PyValue_To_FeatureSet(pyValue); } |
351 | 353 |