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