Skip to content
Snippets Groups Projects
Commit f24db235 authored by bjje's avatar bjje
Browse files

Updated structure of lecture plan and file names (needs to be double checked)

parent 68aacdd9
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ print('Current working directory {}.'.format(pathlib.Path().resolve()))
print('')
print('The numpy version is {}.'.format(np.__version__))
print('The scikit-learn version is {}.'.format(sklearn.__version__))
print('The torch version is{}.'.format(torch.__version__))
print('The torch version is {}.'.format(torch.__version__))
"""
Check that the course specific tools can be imported
......@@ -25,7 +25,7 @@ import dtuimldmtools
print('The dtuimldmtools package {}.'.format(dtuimldmtools))
"""
Check that pandas can be imported (use in ex1)
Check that pandas can be imported (used in ex1)
Note_ If this fails you need to install panda manually https://pandas.pydata.org/docs/getting_started/install.html
......
......@@ -18,9 +18,10 @@ x = np.asmatrix(np.arange(1, 6))
y = np.asmatrix(np.arange(2, 12, 2))
# Again, have a look at them by typing 'x' and 'y' in the console
# Try using the * operator just as before now:
# Try using the * operator just as before now (this should not work!):
x * y
# You should now get an error - try to explain why.
# You should now get an error - try to explain why
# (comment or remove the line to run the rest of the script).
# array and matrix are two data structures added by NumPy package to the list of
# basic data structures in Python (lists, tuples, sets). We shall use both
......
......@@ -5,9 +5,12 @@ import numpy as np
x = np.arange(0, 1, 0.1)
f = np.exp(x)
plt.figure(1)
plt.plot(x, f)
plt.xlabel("x")
plt.ylabel("f(x)=exp(x)")
plt.title("The exponential function")
plt.show()
# %%
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment