htm.core
htm.core copied to clipboard
saveToFile() not implemented correctly for python regions
See comments https://github.com/htm-community/htm.core/pull/873#discussion_r486977186
Probably needs just create bindings for enum. Now can be bypassed by using save() and saving as binary stream, like:
with open(filepath+"_basal.dump", "wb") as f:
f.write(self._tm.basalConnections.save())
Thanks for posting this for me.
Corrected with PR #966
for saveToFile( ) and loadFromFile( ) the arguments are filename
and fmt
fmt
is optional and defaults to "BINARY". The fmt
argument is a string and can be one of
- "BINARY" - fastest but not readable.
- "PORTABLE" - a little slower than "BINARY" but handles big/little endings when going between machines.
- "JSON" - a JSON text serialization that is mostly readable.
- "XML" - an XML text serialization that is mostly readable.
Note: in C++ the fmt
argument can now be either a std::string or the enum as previously defined (see Serialization.hpp).