I get this error Expected Ptr for argument '%s' while resizing image in open cv2 This is my code:

# loading image from folder
folders = glob.glob('path to folder ')

imagenames_list = []

for folder in folders:
    for f in glob.glob(folder+'/*.jpg'):
        imagenames_list.append(f)

read_images = []        

for image in imagenames_list:
    read_images.append(cv2.imread(image, cv2.IMREAD_GRAYSCALE))

re_size = cv2.resize(read_images, (50,50), interpolation=cv2.INTER_LINEAR)


I get this error 

Expected Ptr&lt;cv::UMat&gt; for argument '%s'


What does this mean and how can I fix it?
I changed the data type from float16 to float32, solving the problem:

images.astype(np.float32)