numenta / nupic.core-legacy

Implementation of core NuPIC algorithms in C++ (under construction)
http://numenta.org
GNU Affero General Public License v3.0
272 stars 276 forks source link

Give clear exception when clients try to reuse ClassiferResults #1342

Closed scottpurdy closed 7 years ago

scottpurdy commented 7 years ago

This is to address a community reported segfault by making it clear that you cannot reuse ClassificationResult instances across calls to SDRClassifier.compute. I looked into having compute simply return a new ClassifierResult but it looked like a major refactoring and I wasn't sure I was doing the right thing so punting on that for now.

@mrcslws please review @ywcui1990 fyi