manual:wmat
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
manual:wmat [2014/10/15 14:41] – zenke | manual:wmat [2014/12/02 10:03] (current) – Fixes bug in example zenke | ||
---|---|---|---|
Line 31: | Line 31: | ||
<code python> | <code python> | ||
+ | from scipy.sparse import * | ||
from scipy.io import mmread | from scipy.io import mmread | ||
Line 43: | Line 44: | ||
Likewise, a structured matrix can be prepared in Python and then be loaded in Auryn. To do so, use code along the lines of the following snipped: | Likewise, a structured matrix can be prepared in Python and then be loaded in Auryn. To do so, use code along the lines of the following snipped: | ||
<code python> | <code python> | ||
+ | from scipy.sparse import * | ||
from scipy.io import mmwrite | from scipy.io import mmwrite | ||
Line 50: | Line 52: | ||
mmwrite(' | mmwrite(' | ||
</ | </ | ||
- | Note that the additional conversion step to a csr_matrix is necessary to ensure the correct ordering of entries in the text file. If this step is omitted, Auryn might not be able to parse the sparse matrix and will throw a runtime exception. | + | |
+ | The additional conversion step to a csr_matrix is necessary to ensure the correct ordering of entries in the text file. If this step is omitted, Auryn might not be able to parse the sparse matrix and will throw a runtime exception. | ||
+ | |||
+ | **Note** that in many cases SciPy will append the file extension '' |
manual/wmat.1413384103.txt.gz · Last modified: 2014/10/15 14:41 by zenke