Skip to content

Commit

Permalink
Merge pull request numenta#480 from htm-community/hotgym
Browse files Browse the repository at this point in the history
Hotgym
  • Loading branch information
ctrl-z-9000-times authored Jun 7, 2019
2 parents a81757a + 5cf68cb commit 5b0b4a9
Show file tree
Hide file tree
Showing 9 changed files with 4,659 additions and 6 deletions.
7 changes: 7 additions & 0 deletions bindings/py/cpp_src/bindings/algorithms/py_SpatialPooler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,13 @@ using namespace sdr;
py_SpatialPooler.def("getIterationLearnNum", &SpatialPooler::getIterationLearnNum);


py_SpatialPooler.def("__str__",
[](SpatialPooler &self) {
std::stringstream buf;
buf << self;
return buf.str(); });


// pickle

py_SpatialPooler.def(py::pickle(
Expand Down
6 changes: 6 additions & 0 deletions bindings/py/cpp_src/bindings/algorithms/py_TemporalMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@ R"()");
py_HTM.def_property_readonly("anomaly", [](const HTM_t &self) { return self.anomaly; },
"Anomaly score updated with each TM::compute() call. "
);

py_HTM.def("__str__",
[](HTM_t &self) {
std::stringstream buf;
buf << self;
return buf.str(); });
}

} // namespace nupic_ext
1 change: 1 addition & 0 deletions bindings/py/packaging/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ def generateExtensions():
install_requires=findRequirements(platform),
package_data={
"nupic.bindings": ["*.so", "*.pyd"],
"nupic.examples": ["*.csv"],
},
extras_require = {},
zip_safe=False,
Expand Down
Loading

0 comments on commit 5b0b4a9

Please sign in to comment.