opencobra/cobrapy — pull request #59 by aebrahim (2014-01-10 05:41:28+00:00)
Title: [WIP - Untested] ArrayBasedModel has updateable arrays and matrix

This pull request continues from #57. The sparse conversions are pretty tricky, so this should not get merged until I've written good unit tests.

The general idea is that doing the following actions propagates to the cobrapy objects

```python
model.S[1, 1] = 2
model.lower_bounds[4] = -1000
model.objective_coefficient = zeros(len(model.reactions))
model.objective_coefficient[10] = 1
```

A few things need to be done before this feature is completed.

* [x] S Matrix updating changes stoichiometry (through SMatrix class)
* [x] SMatrix class for all sparse types, handling conversion (i.e. SMatrix.tolil())
* [ ] model.S does not support assignment (or if it does, then re-compute all stoichiometry on __setattr__)
* [ ] model.lower_bounds (etc.) update reactions/metabolites on __setitem__
* [ ] model.lower_bounds (etc.) update all reactions/metabolites on __setattr__
* [ ] unit tests
* [ ] performance assessment and optimization