457 |
return False |
return False |
458 |
|
|
459 |
def on_tools_sparsity_click(self,*args): |
def on_tools_sparsity_click(self,*args): |
460 |
|
import pylab; |
461 |
self.reporter.reportNote("Preparing sparsity matrix...") |
self.reporter.reportNote("Preparing sparsity matrix...") |
462 |
_im = self.sim.getIncidenceMatrix(); |
_im = self.sim.getIncidenceMatrix(); |
463 |
_id = _im.getIncidenceData(); |
_id = _im.getIncidenceData(); |
464 |
print repr(_id); |
|
465 |
|
data = pylab.zeros((_im.getNumCols(), _im.getNumRows()))*0. |
466 |
|
for i in _id: |
467 |
|
data[i.col, i.row] = int(i.type) |
468 |
|
|
469 |
|
pylab.spy2(data) |
470 |
|
pylab.ion() |
471 |
|
pylab.show(False) |
472 |
|
|
473 |
# -------------------------------------------- |
# -------------------------------------------- |
474 |
# MODULE LIST |
# MODULE LIST |