Update 100_Numpy_exercises_with_solutions.md
This commit is contained in:
@@ -682,7 +682,7 @@ print(F)
|
|||||||
|
|
||||||
w,h = 16,16
|
w,h = 16,16
|
||||||
I = np.random.randint(0,2,(h,w,3)).astype(np.ubyte)
|
I = np.random.randint(0,2,(h,w,3)).astype(np.ubyte)
|
||||||
F = I[...,0]*256*256 + I[...,1]*256 +I[...,2]
|
F = I[...,0]*(256*256) + I[...,1]*256 +I[...,2]
|
||||||
n = len(np.unique(F))
|
n = len(np.unique(F))
|
||||||
print(np.unique(I))
|
print(np.unique(I))
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user