create matrices.logpy
pull some util functions out of fortran.core