Skip to content

Commit

Permalink
Merge pull request #17 from ibah/master
Browse files Browse the repository at this point in the history
Correcting solution to the 'round away from 0' exercise
  • Loading branch information
rougier committed Aug 23, 2016
2 parents 429db56 + 9e6559e commit 9ee1a2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 100 Numpy exercises.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@
"# Author: Charles R Harris\n",
"\n",
"Z = np.random.uniform(-10,+10,10)\n",
"print (np.trunc(Z + np.copysign(0.5, Z)))"
"print (np.copysign(np.ceil(np.abs(Z)), Z))"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion 100 Numpy exercises.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ print(np.array([np.nan]).astype(int).astype(float))
# Author: Charles R Harris

Z = np.random.uniform(-10,+10,10)
print (np.trunc(Z + np.copysign(0.5, Z)))
print (np.copysign(np.ceil(np.abs(Z)), Z))
```

#### 30. How to find common values between two arrays? (★☆☆)
Expand Down

0 comments on commit 9ee1a2c

Please sign in to comment.