nocad.io.from_state_space#
- nocad.io.from_state_space(A, B=None, C=None, D=None, labels=None)[source]#
Network of a state-space model: \(\mathbf{W}=\mathbf{A}^{\mathsf T}\).
The driver nodes are the non-zero rows of \(\mathbf{B}\), the sensor nodes the non-zero columns of \(\mathbf{C}\).
Examples
>>> net = from_state_space([[-1, 0], [1, -1]], B=[[1], [0]], C=[[0, 1]]) >>> net.adj.toarray().astype(int).tolist(), net.drivers.tolist(), net.sensors.tolist() ([[1, 1], [0, 1]], [0], [1])