Thank you for your aclaration but when i run the code it gives me this error:
25 arraynegativos= ds_negatives.reshape(( n_negatives_img, img_width, img_height))
     26 arraypositivos= ds_positives.reshape((n_positives_img, img_width, img_height))

AttributeError: 'list' object has no attribute 'reshape'

So i converted my ds_negative to numpy array like this:

ds_negatives1 = np.array(ds_negatives)

But it gives me this error:
cannot reshape array of size 1 into shape (26308,80,60)
So now im a bit confused, how do i transform my dataset to be reshaped into that?
Thanks in advance.
Link to google collab script: Google Colab 2