Skip to content
Snippets Groups Projects
Commit b19519d9 authored by Nicolas Aspert's avatar Nicolas Aspert
Browse files

fix years

parent d2a0b8ed
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ Follow the below instructions to install it and create an environment for the co
Windows: open the Anaconda Prompt from the Start menu.
1. Install git with `conda install git`.
1. Navigate to the folder where you want to store the course material with `cd path/to/folder`.
1. Download this repository with `git clone https://gitlab.epfl.ch/lts2/matrix-analysis-2024`.
1. Download this repository with `git clone https://gitlab.epfl.ch/lts2/matrix-analysis-2025`.
1. Enter the repository with `cd matrix-analysis-2025`.
1. Create an environment with the packages required for the course with `conda env create -f environment.yml`.
1. Run the steps below to start Jupyter. You should be able to run the [`test_install.ipynb`][test_install] notebook.
......
%% Cell type:markdown id:0e44bd91-51a7-4c56-92e5-c196be7941af tags:
# [Matrix Analysis'24]: test your installation
[matrix analysis'24]: https://github.com/epfl-lts2/matrix-analysis-2024
# [Matrix Analysis'25]: test your installation
[matrix analysis'25]: https://gitlab.epfl.ch/lts2/matrix-analysis-2025
[EPFL LTS2](https://lts2.epfl.ch)
%% Cell type:markdown id:81936a03-dd2d-4348-af93-828a107ec5c1 tags:
This is a mini "test" Jupyter notebook to make sure the main packages we'll use are installed.
Run it after following the [installation instructions](https://github.com/epfl-lts2/matrix-analysis-2024#installation).
Run it after following the [installation instructions](https://gitlab.epfl.ch/lts2/matrix-analysis-2025#installation).
%% Cell type:markdown id:2dc4d30c-4162-4347-9ea1-7bc5249c81ee tags:
## Standalone dependencies
If you get a `command not found` error, try to run `conda install <package-name>` (in the `matrix-analysis-2024` environment, i.e., after `conda activate matrix-analysis-2024`).
If you get a `command not found` error, try to run `conda install <package-name>` (in the `matrix-analysis-2025` environment, i.e., after `conda activate matrix-analysis-2025`).
%% Cell type:code id:4737f499-386c-463b-8630-85e7bfac5acc tags:
``` python
!conda --version # this will fail on Noto
```
%% Cell type:code id:ec0596c7-967b-4399-81da-6602bbdcc17d tags:
``` python
!git --version
```
%% Cell type:code id:0862c7bf-8ae0-4f9a-b96a-1698e59e4aed tags:
``` python
from platform import python_version
print(python_version())
```
%% Cell type:code id:41138a01-2426-4cbf-9661-a7e780f06ef4 tags:
``` python
!jupyter --version
!ipython --version
!jupyter-lab --version
!jupyter-notebook --version
```
%% Cell type:markdown id:e3d1d1b1-f09f-44ad-ba14-726451d9898b tags:
## Python packages
If you get a `ModuleNotFoundError` error, try to run `conda install <package-name>` (in the `matrix-analysis-2023` environment, i.e., after `conda activate matrix-analysis-2024`).
If you get a `ModuleNotFoundError` error, try to run `conda install <package-name>` (in the `matrix-analysis-2025` environment, i.e., after `conda activate matrix-analysis-2025`).
%% Cell type:code id:a1141b09-2122-4862-8b69-2c9d40187662 tags:
``` python
import numpy as np
np.__version__
```
%% Cell type:code id:c9537241-0f85-4d72-a62f-039826aa7f8c tags:
``` python
import scipy
scipy.__version__
```
%% Cell type:code id:3860668d-bb4c-4121-94d5-f4655167afc2 tags:
``` python
import matplotlib as mpl
mpl.__version__
```
%% Cell type:markdown id:08ef3716-82c6-4d00-bdb8-e9d3225c8b69 tags:
## Small test
%% Cell type:code id:0aa07bd9-448b-4ceb-a3d8-15109cb439e1 tags:
``` python
%matplotlib inline
```
%% Cell type:code id:734b2128-a529-491b-b75e-71874db8de71 tags:
``` python
import matplotlib.pyplot as plt
def plot_vect(x, b, xlim, ylim):
'''
function to plot two vectors,
x - the original vector
b - the transformed vector
xlim - the limit for x
ylim - the limit for y
'''
plt.figure(figsize = (10, 6))
plt.quiver(0,0,x[0],x[1],\
color='k',angles='xy',\
scale_units='xy',scale=1,\
label='Original vector')
plt.quiver(0,0,b[0],b[1],\
color='g',angles='xy',\
scale_units='xy',scale=1,\
label ='Transformed vector')
plt.xlim(xlim)
plt.ylim(ylim)
plt.xlabel('X')
plt.ylabel('Y')
plt.legend()
plt.show()
```
%% Cell type:code id:c493443b-930d-49ba-ae19-823e5dae362c tags:
``` python
A = np.array([[2, 0],[0, 1]])
x = np.array([1, 1])
b = np.dot(A, x.T)
plot_vect(x,b,(0,3),(0,2))
```
%% Cell type:code id:c6002c2a-1d9c-4ca3-aa11-7f4b5cf0c30a tags:
``` python
```
......
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