Closed kretes closed 2 years ago
Hi @kretes ! Thank you so much for investing your time in digging so deep into the source code to find the root cause and report it! Very much appreciated! I will try to recreate this problem following the details you shared and hopefully we can fix it with the next release. Thank you!
First of all - thanks for the lib, it is really nice and helpful!
I first came across a strange thing, which is a different working of the library when I pass data as imageIO images. Although they are numpy arrays - I think they aren't recognized correctly by the library, but this only affects the situation when the passed images are of diverse shapes.
See this reproducible example:
which just creates two random images and tries to display them with
plot_class_tabs
. The error got is :The reason for that is that I pass imageIO Arrays and not numpy arrays. IF any of those is changed in the example:
# images = [np.asarray(im) for im in images]
)Everything works. I think the reason for that is that:
type(img) == np.ndarray
intoisinstance(img, np.ndarray)
- the subclass should be handled appropriately.