some refinement
This commit is contained in:
@@ -863,9 +863,9 @@ hint: np.unique
|
||||
< a66
|
||||
# Author: Fisher Wang
|
||||
|
||||
w, h = 16, 16
|
||||
img = np.random.randint(0, 256, (w, h, 3)).astype(np.ubyte)
|
||||
colors = np.unique(img.reshape(-1, 3), axis=0)
|
||||
w, h = 256, 256
|
||||
I = np.random.randint(0, 4, (w, h, 3)).astype(np.ubyte)
|
||||
colors = np.unique(I.reshape(-1, 3), axis=0)
|
||||
n = len(colors)
|
||||
print(n)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user