vault backup: 2025-03-04 11:17:00

This commit is contained in:
2025-03-04 11:17:00 +08:00
parent d1e51bfd2f
commit ff12c4f4ca
161 changed files with 1 additions and 2 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]
```