Skip to content

Commit

Permalink
fixed numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLeoni committed Nov 2, 2019
1 parent d678cdf commit fa3559b
Showing 1 changed file with 2 additions and 52 deletions.
54 changes: 2 additions & 52 deletions exercises/matrices-numpy/matrices-numpy-solution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@
"\n",
"Let's make an attempt of substitution, as an example we first try dividing a number by positive zero (even if math teachers tell us such divisions are forbidden) - what will we ever get??\n",
"\n",
"$ \\frac{5.0}{0.0}= ???$\n",
"$\\frac{5.0}{0.0}=???$\n",
"\n",
"In Numpy terms, we might write like this to box everything in arrays:"
]
Expand Down Expand Up @@ -1873,7 +1873,7 @@
"\n",
"**WARNING: the following may cause severe convulsions and nausea.**\n",
"\n",
"During clinical trials, both mathematically inclined and math-averse patients have experienced such symptoms, for different reasons.\n",
"During clinical trials, both mathematically inclined and math-averse patients have experienced illness, for different reasons which are currently being investigated.\n",
"\n",
"</div>\n",
"\n",
Expand All @@ -1898,56 +1898,6 @@
"```"
]
},
{
"cell_type": "code",
"execution_count": 62,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"False"
]
},
"execution_count": 62,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"[np.nan, np.inf] == [-np.nan, np.inf]"
]
},
{
"cell_type": "code",
"execution_count": 63,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/da/Da/bin/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:1: RuntimeWarning: invalid value encountered in sqrt\n",
" \"\"\"Entry point for launching an IPython kernel.\n"
]
},
{
"data": {
"text/plain": [
"nan"
]
},
"execution_count": 63,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.sqrt(-1)*np.sqrt(-1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit fa3559b

Please sign in to comment.