cv2.error: OpenCV(4.3.0) error: (-215:Assertion failed)
.
ann.train(np.array(image, dtype=np.float32), cv2.ml.ROW_SAMPLE, np.array(trainingLabel, dtype=np.float32))
cv2.error: OpenCV(4.3.0) ..\modules\ml\src\data.cpp:257: error: (-215:Assertion failed) samples.type() == CV_32F || samples.type() == CV_32S in function 'cv::ml::TrainDataImpl::setData'
we probably need to see more code.
please edit your question, and show, how you construct trainData and labels
fact that you tried to wrap your data with np.array() already looks desperate / suspect ...