some refinement

This commit is contained in:
Fisher Wang 2021-03-12 22:29:45 +08:00
parent 8527c7c83c
commit 589e79f78a
3 changed files with 9 additions and 9 deletions

View File

@ -680,9 +680,9 @@ print(F)
```python
# 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)
```

View File

@ -680,9 +680,9 @@ print(F)
```python
# 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)
```

View File

@ -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)