test the single gradient versions for correctly dimensioned return matrix