General purpose functions for other gonum repositories