2!!!!!!!!!!!!!!!!!!!!!!!!!!!Chapitre!6!:!Outils!graphiques!et!numériques!de!Python!
D#.&B%&+$.+)%07#)(3(1+$%3+1%,"/-)("/1%.*);9.*)(5#+1%#1#+33+1%E%
K%np.exp(x)%E%,"/-)("/%+C&"/+/)(+33+%
K%np.log(x)%E%,"/-)("/%3"<*$();.+%/9&9$(+/%
K%np.sin(x)%L%np.cos(x)%E%,"/-)("/1%1(/#1%L%-"1(/#1%%
K%np.tan(x)%E%,"/-)("/%)*/<+/)+%
K%np.arcsin(x)%L%np.arccos(x)%E%,"/-)("/1%(/'+$1+1%0+%1(/#1%L%-"1(/#1%%
K%np.arctan(x)%E%,"/-)("/%(/'+$1+%0+%)*/<+/)+%%
K%np.sinh(x)%L%np.cosh(x)%E%,"/-)("/1%1(/#1%;B&+$2"3(5#+%L%-"1(/#1%;B&+$2"3(5#+%%
K%np.tanh(x)%E%,"/-)("/%)*/<+/)+%;B&+$2"3(5#+%
D#.&B%-"/)(+/)%9<*3+.+/)%0+1%,"/-)("/1%&+$.+))*/)%3+1%-*3-#31%#1#+31%1#$%3+1%/".2$+1%-".&3+C+1%E%
K%np.real(x)%E%$+/'"(+%3*%&*$)(+%$9+33+%0#%/".2$+%-".&3+C+%C%
K%np.imag(x)%E%$+/'"(+%3*%&*$)(+%(.*<(/*($+%0#%/".2$+%-".&3+C+%C%
K%np.abs(x)%E%$+/'"(+%3+%."0#3+%0#%/".2$+%-".&3+C+%C%
K%np.angle(x)%E%$+/'"(+%37*$<#.+/)%:+/%$*0(*/1>%0#%/".2$+%-".&3+C+%C%
K%np.conj(x)%E%$+/'"(+%3+%-".&3+C+%-"/H#<#9%0#%/".2$+%-".&3+C+%C%
A+1% ,"/-)("/1% .*);9.*)(5#+1% -"/)+/#+1% 0*/1% 3+% ."0#3+%D#.&B% 1"/)% $+0"/0*/)+1% *'+-% -+33+1% 0#%
."0#3+%.*);%:+33+1%<9/9$*3(1+/)%+/%,*()%3+1%,"/-)("/1%0#%."0#3+%.*);%&"#$%)"#1%3+1%)B&+18%B%-".&$(1%3+1%
)*23+*#C>%E%(3%+1)%0"/-%inutile0d’importer0le0module0math0dès0que0l’on0importe0Numpy?%
1.3. )Fonctions)de)Numpy)pour)créer)des)tableaux)1D)
D#.&B%&+$.+)%-+&+/0*/)%0+%-$9+$%0+1%)*23+*#C%MN%:"#%'+-)+#$1>%*'+-%3+1%,"/-)("/1%1#('*/)+1%E%
K%3*%,"/-)("/%np.array(a,b,c,d,e)%$+/'"(+%#/%)*23+*#%MN%0"/)%3+1%'*3+#$1%1"/)%*8%28%-8%0%+)%+?%
K% 3*% ,"/-)("/% np.arrange(a,b,c)0$+/'"(+% #/% )*23+*#% MN% 0"/)% 3*% 2"$/+% (/,9$(+#$+% +1)% *8% 3*% 2"$/+%
1#&9$(+#$+%+1)%2%+)%37(/)+$'*33+%+/)$+%3+1%0(,,9$+/)+1%-".&"1*/)+1%0#%)*23+*#%+1)%-?%%
K% 3*% ,"/-)("/%np.linspace(a,b,c)0$+/'"(+% #/% )*23+*#% MN% 0"/)% 3*% 2"$/+% (/,9$(+#$+% +1)% *8% 3*% 2"$/+%
1#&9$(+#$+%+1)%2%+)%-"/)+/*/)%-%)+$.+1%95#($9&*$)(1?%
K%%3*%,"/-)("/%np.zeros(n)0$+/'"(+%#/%)*23+*#%MN%-"/)+/*/)%/%)+$.+1%9<*#C%6%O?%%
K%%3*%,"/-)("/%np.ones(n)0$+/'"(+%#/%)*23+*#%MN%-"/)+/*/)%/%)+$.+1%9<*#C%6%M?%%
PC+.&3+1%E%%
(.&"$)%/#.&B%*1%/&%
/&?*$$*/<+:Q8MR8S>%%%%/&?3(/1&*-+:S8MO8R>%
%%T91#3)*)%E%UQ%8%R%8%V%8%W%8%MM%8%MQX%%%%%T91#3)*)%E%US%8%Y%8%Z%8%[%8%MOX%
D")"/1%5#+%0*/1%3*%,"/-)("/%/&?*$$*/<+%3*%2"$/+%1#&9$(+#$+%0+%37(/)+$'*33+%+1)%+C-3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