Auryn simulator

Simulator for spiking neural networks with synaptic plasticity

User Tools

Site Tools


manual:wmat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
manual:wmat [2014/10/15 14:41] zenkemanual: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('save.wmat',sw) mmwrite('save.wmat',sw)
 </code> </code>
-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 ''mtx'' to the output file which will require you to rename it to wmat afterwards
manual/wmat.txt · Last modified: 2014/12/02 10:03 by zenke