vault backup: 2023-11-09 14:57:27
This commit is contained in:
14
.obsidian/workspace.json
vendored
14
.obsidian/workspace.json
vendored
@@ -41,7 +41,7 @@
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "05. 資料收集/Keras.tensorflow - Dataset.md",
|
||||
"file": "05. 資料收集/numpy - 同樣順序打亂多個array.md",
|
||||
"mode": "source",
|
||||
"source": true
|
||||
}
|
||||
@@ -77,7 +77,7 @@
|
||||
"state": {
|
||||
"type": "search",
|
||||
"state": {
|
||||
"query": "tensorflow",
|
||||
"query": "numpy ",
|
||||
"matchingCase": false,
|
||||
"explainSearch": false,
|
||||
"collapseAll": false,
|
||||
@@ -114,7 +114,7 @@
|
||||
"state": {
|
||||
"type": "backlink",
|
||||
"state": {
|
||||
"file": "05. 資料收集/Keras.tensorflow - Dataset.md",
|
||||
"file": "05. 資料收集/numpy - 同樣順序打亂多個array.md",
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
@@ -139,7 +139,7 @@
|
||||
"state": {
|
||||
"type": "outline",
|
||||
"state": {
|
||||
"file": "05. 資料收集/Keras.tensorflow - Dataset.md"
|
||||
"file": "05. 資料收集/numpy - 同樣順序打亂多個array.md"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -167,7 +167,7 @@
|
||||
"state": {
|
||||
"type": "file-properties",
|
||||
"state": {
|
||||
"file": "05. 資料收集/Keras.tensorflow - Dataset.md"
|
||||
"file": "05. 資料收集/numpy - 同樣順序打亂多個array.md"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -212,8 +212,9 @@
|
||||
},
|
||||
"active": "9ef635642faa0c82",
|
||||
"lastOpenFiles": [
|
||||
"05. 資料收集/Keras.tensorflow - shuffle.md",
|
||||
"05. 資料收集/Keras.tensorflow - Dataset.md",
|
||||
"05. 資料收集/numpy - 同樣順序打亂多個array.md",
|
||||
"05. 資料收集/Keras.tensorflow - shuffle.md",
|
||||
"01. 個人/01. Daily/2023-11-08(週三).md",
|
||||
"01. 個人/01. Daily/2023-11-07(週二).md",
|
||||
"01. 個人/01. Daily/2023-11-06(週一).md",
|
||||
@@ -242,7 +243,6 @@
|
||||
"00. Inbox/My Mindmap.canvas",
|
||||
"05. 資料收集/AI.md",
|
||||
"00. Inbox/Habit Tracker.md",
|
||||
"00. Inbox/台語諺語.md",
|
||||
"00. Inbox/vc-fwUpdate code trace(Meetup).canvas",
|
||||
"05. 資料收集/Tool Setup/Software/diskstation/share/Tools/字型",
|
||||
"05. 資料收集/Tool Setup/Software/diskstation/share/Tools",
|
||||
|
||||
10
05. 資料收集/numpy - 同樣順序打亂多個array.md
Normal file
10
05. 資料收集/numpy - 同樣順序打亂多個array.md
Normal 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]
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user