Skip to content

Commit 35a6dc4

Browse files
authored
Merge pull request rougier#21 from ibah/master
detail: improved readability for 'point by point distances' exercise
2 parents 04b3714 + 15ede08 commit 35a6dc4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

100 Numpy exercises.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@
10761076
"outputs": [],
10771077
"source": [
10781078
"Z = np.random.random((10,2))\n",
1079-
"X,Y = np.atleast_2d(Z[:,0]), np.atleast_2d(Z[:,1])\n",
1079+
"X,Y = np.atleast_2d(Z[:,0], Z[:,1])\n",
10801080
"D = np.sqrt( (X-X.T)**2 + (Y-Y.T)**2)\n",
10811081
"print(D)\n",
10821082
"\n",

100 Numpy exercises.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ print(Z)
498498

499499
```python
500500
Z = np.random.random((10,2))
501-
X,Y = np.atleast_2d(Z[:,0]), np.atleast_2d(Z[:,1])
501+
X,Y = np.atleast_2d(Z[:,0], Z[:,1])
502502
D = np.sqrt( (X-X.T)**2 + (Y-Y.T)**2)
503503
print(D)
504504

0 commit comments

Comments
 (0)