CovertLab / arrow

Stochastic simulations in python
MIT License
3 stars 1 forks source link

Adjustment to API to pass rates into evolve() instead of __init__() #42

Closed prismofeverything closed 4 years ago

prismofeverything commented 4 years ago

While applying Arrow to some problems in Vivarium, I came across the need to pass in the rates to the system each time I call it (dynamics rates), rather than supplying them when the system is initialized (static rates). To support this, I shifted the __init__ for StochasticSystem to take only the stoichiometry and then pass in the rates to the call to evolve. This is mostly an API change as the essential implementation doesn't care when the rates appeared, it just indexes into them when necessary.

1fish2 commented 4 years ago

One thought: The README could use change notes, esp. for an incompatible API change.

prismofeverything commented 4 years ago

Amazing how many edits it takes to move one argument.

Yeah, and way better than before you converted to Cython! Thanks again for that one.

The README could use change notes, esp. for an incompatible API change.

Done.