Generates stochastic matrices with given properties
>>> import invspec
>>> import numpy as np
>>>
>>> eigenvalues = np.array([0.9, 0.8, 0.4, 0.2])
>>> matrix = invspec.stochastic_matrix(eigenvalues)
>>>
>>> evals, evecs = np.linalg.eig(matrix)
>>> evals
[1, 0.9, 0.8, 0.4, 0.2]
Copyright (c) 2021, rob arbon
Project based on the Computational Molecular Science Python Cookiecutter version 1.5.