Helper functions for stoichiometric consistency checks.
memote.support.consistency_helpers.
stoichiometry_matrix
(metabolites, reactions)[source]¶Return the stoichiometry matrix representation of a set of reactions.
The reactions and metabolites order is respected. All metabolites are expected to be contained and complete in terms of the reactions.
Parameters: | reactions : iterable
metabolites : iterable
|
---|---|
Returns: | numpy.array
dict
dict
|
memote.support.consistency_helpers.
nullspace
(matrix, atol=1e-13, rtol=0.0)[source]¶Compute the nullspace of a 2D numpy.array.
Notes
Adapted from: https://scipy.github.io/old-wiki/pages/Cookbook/RankNullspace.html