How to augment the image from arrays?

I am beginner of DL,
I am trying mnist with CNN, the mnist data are some gray images provided in CSV files, I load them to arrays, then call ImageClassifierData.from_arrays to generate data. But if I add augmentations like RandomRotate, I got error like

~/fastai/practices/digit_recognizer/fastai/transforms.py in zoom_cv(x, z)
     20     r,c,*_ = x.shape
     21     M = cv2.getRotationMatrix2D((c/2,r/2),0,z+1.)
---> 22     return cv2.warpAffine(x,M,(c,r))
     23 
     24 def stretch_cv(x,sr,sc,interpolation=cv2.INTER_AREA):

error: OpenCV(3.4.2) /io/opencv/modules/imgproc/src/imgwarp.cpp:1804: error: (-215:Assertion failed) ifunc != 0 in function 'remap'

my ipynb
digit_recognizer.pdf (108.1 KB)

Anybody can tell me what’s wrong in my code? thank you