Another solution to question 96.

We can use np.unique with axis=0 to return unique rows of an array. For NumPy >= 1.13
This commit is contained in:
kuzand
2018-11-02 15:55:56 +02:00
committed by GitHub
parent 5ec27f54c8
commit 5b18530d79

View File

@@ -1157,8 +1157,8 @@ _, idx = np.unique(T, return_index=True)
uZ = Z[idx]
print(uZ)
# Another solution, for NumPy >= 1.13
# Author: Andreas Kouzelis
# For NumPy >= 1.13
uZ = np.unique(Z, axis=0)
print(uZ)
```