RF: define gradient functions as def instead of cdef to make template specialization cleaner.
RF: define gradient functions as def instead of cdef to make template specialization cleaner.

jyeatman/dipy,FrancoisRheaultUS/dipy,JohnGriffiths/dipy,StongeEtienne/dipy,StongeEtienne/dipy,matthieudumont/dipy,sinkpoint/dipy,sinkpoint/dipy,demianw/dipy,villalonreina/dipy,nilgoyyou/dipy,FrancoisRheaultUS/dipy,JohnGriffiths/dipy,nilgoyyou/dipy,demianw/dipy,villalonreina/dipy,jyeatman/dipy,matthieudumont/dipy