Working on exposing ScalarMatrixFunc