From ba894e9de2e981ba6e56974e4dd3e2c7e009d010 Mon Sep 17 00:00:00 2001 From: ec6c2d38b7cace4ce8fa0c82ca665c1e Date: Thu, 9 Dec 2021 16:27:19 +0000 Subject: [PATCH] Update toy_document_orgmode_python_fr.org --- module2/exo1/toy_document_orgmode_python_fr.org | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/module2/exo1/toy_document_orgmode_python_fr.org b/module2/exo1/toy_document_orgmode_python_fr.org index e72b9f0..9243d31 100644 --- a/module2/exo1/toy_document_orgmode_python_fr.org +++ b/module2/exo1/toy_document_orgmode_python_fr.org @@ -51,7 +51,7 @@ theta = np.random.uniform(size=N, low=0, high=pi/2) Sinon, une méthode plus simple à comprendre et ne faisant pas intervenir d'appel à la fonction sinus se base sur le fait que si X∼U(0,1) et Y∼U(0,1) alors P[X^2+Y^2 ≤ 1]=\pi/4 (voir [[https://fr.wikipedia.org/wiki/M%C3%A9thode_de_Monte-Carlo#D%C3%A9termination_de_la_valeur_de_%CF%80][méthode de Monte Carlo sur Wikipedia]]). Le code suivant illustre ce fait : -#+begin_src python :results output file :session :var matplot_lib_filename="./exe.png" :exports results +#+begin_src python :results silent :session :var matplot_lib_filename="./exe.png" :exports results import matplotlib.pyplot as plt import numpy as np @@ -70,15 +70,8 @@ ax.scatter(x[reject], y[reject], c='r', alpha=0.2, edgecolor=None) ax.set_aspect('equal') plt.savefig(matplot_lib_filename) -print(matplot_lib_filename) #+end_src -#+RESULTS: -[[file: ->>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> - -./exe.png]] - [[file:./exe.png]] -- 2.18.1