ensign.sptensor.write_sptensor¶
-
write_sptensor
(directory, sptensor, tensor_filename='tensor_data.txt')[source]¶ Writes a sparse tensor to the filesystem.
- Parameters
- directorystr
Directory to write the tensor to. This directory will be created if nonexistent and will be overwritten if it exists.
- sptensorSPTensor
The sparse tensor to be written.
- Raises
- Exception
If the sparse tensor could not be written.
See also
ensign.sptensor.SPTensor
Sparse tensor class