some refinement
This commit is contained in:
parent
8527c7c83c
commit
589e79f78a
@ -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)
|
||||
```
|
||||
|
@ -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)
|
||||
```
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user