vault backup: 2025-03-04 11:12:06

This commit is contained in:
2025-03-04 11:12:06 +08:00
parent fd1b61cd3b
commit d1e51bfd2f
144 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
如果多個array的順序有相關性我們要用同樣的順序來打亂他們可以用以下方法
```python
array1 = np.array([[1, 1], [2, 2], [3, 3]])
array2 = np.array([1, 2, 3])
shuffler = np.random.permutation(len(array1))
array1_shuffled = array1[shuffler]
array2_shuffled = array2[shuffler]
```