correcting syntax errors in ipy notebook

This commit is contained in:
ibah 2016-09-01 13:52:41 +02:00
parent 9b248dd3de
commit 1a20be883b
2 changed files with 7 additions and 5 deletions

View File

@ -855,13 +855,14 @@
"source": [
"A = np.random.randint(0,2,5)\n",
"B = np.random.randint(0,2,5)\n",
"# Assuming identical shape of the arrays and a tolerance for the comparison of values"
"\n",
"# Assuming identical shape of the arrays and a tolerance for the comparison of values\n",
"equal = np.allclose(A,B)\n",
"print(equal)\n",
"\n",
"# Checking both the shape and the element values, no tolerance (values have to be exactly equal)\n",
"equal = np.array_equal(A,B)\n",
"print(equal)"
"\n"
"# Checking both the shape and the element values, no tolerance (values have to be exactly equal)"
"equal = np.array_equal(A,B)"
"print(equal)"
]
},
{

View File

@ -387,6 +387,7 @@ np.add.reduce(Z)
```python
A = np.random.randint(0,2,5)
B = np.random.randint(0,2,5)
# Assuming identical shape of the arrays and a tolerance for the comparison of values
equal = np.allclose(A,B)
print(equal)