fix the grad1d/grad2d test
fixing test for 4d matrice
fixing the matrice5d test and the 4d grad