I is an image of shape (h, w, 3). Return the number of unique colors, i.e. the number of distinct RGB triples among all of its pixels.
I
(h, w, 3)
Input
[[[0 1 2] [0 1 2]] [[3 3 3] [0 1 2]]]
Output
2
This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.
solve(...)