Skip to content

Commit

Permalink
Issue numenta#1380: Fix Linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
lscheinkman committed Jan 13, 2018
1 parent fda19d0 commit 6a152d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/nupic/bindings/algorithms.i
Original file line number Diff line number Diff line change
Expand Up @@ -1165,8 +1165,8 @@ void forceRetentionOfImageSensorLiteLibrary(void) {

inline void compute(PyObject *py_inputArray, bool learn, PyObject *py_activeArray)
{
nupic::CheckedNumpyVectorWeakRefT<nupic::UInt32> inputArray(py_inputArray);
nupic::CheckedNumpyVectorWeakRefT<nupic::UInt32> activeArray(py_activeArray);
nupic::CheckedNumpyVectorWeakRefT<nupic::UInt> inputArray(py_inputArray);
nupic::CheckedNumpyVectorWeakRefT<nupic::UInt> activeArray(py_activeArray);
self->compute(inputArray.begin(), learn, activeArray.begin());
}

Expand Down
6 changes: 4 additions & 2 deletions src/nupic/py_support/NumpyVector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <nupic/types/Types.hpp> // For nupic::Real.
#include <nupic/utils/Log.hpp> // For NTA_ASSERT
#include <algorithm> // For std::copy.
#include <boost/compute/type_traits/type_name.hpp> // for 'type_name'
#include <boost/type_index/stl_type_index.hpp> // for 'type_id'

namespace nupic {

Expand Down Expand Up @@ -457,7 +457,9 @@ namespace nupic {
if (!PyArray_EquivTypenums(
PyArray_TYPE(this->pyArray_), LookupNumpyDType((const T *) 0)))
{
NTA_THROW << "Expecting '" << boost::compute::type_name<T>() << "' "
boost::typeindex::stl_type_index expectedType =
boost::typeindex::stl_type_index::type_id<T>();
NTA_THROW << "Expecting '" << expectedType.pretty_name() << "' "
<< "but got '" << PyArray_DTYPE(this->pyArray_)->type << "'";
}
}
Expand Down

0 comments on commit 6a152d6

Please sign in to comment.