export a (hopefully) working pinv for older hmatrix too
a working inverse/pseudoinverse