PDMats is needed for @check_argdims.