File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717y_3d = (np .cos (ph ) * np .sin (th )) .ravel ()
1818z_3d = (np .sin (ph ) * np .ones ( th .shape )) .ravel ()
1919
20+ rho = np .linspace (0 , 2 * np .pi , 1000 ) # dim=( 1000,)
21+ a = np .arange (- 4 ,3 )[:, np .newaxis ] # dim=(7,1)
22+
2023
2124
2225
7780 wait = 1 )
7881
7982# Conchoids of de Sluze. Broadcasting example
80- theta = np .linspace (0 , 2 * np .pi , 1000 ) # dim=( 1000,)
81- a = np .arange (- 4 ,3 )[:, np .newaxis ] # dim=(7,1)
82- gp .plot ( theta ,
83- 1. / np .cos (theta ) + a * np .cos (theta ), # broadcasted. dim=(7,1000)
83+ gp .plot ( rho ,
84+ 1. / np .cos (rho ) + a * np .cos (rho ), # broadcasted. dim=(7,1000)
8485
8586 _with = 'lines' ,
8687 set = 'polar' ,
269270# basics
270271gp .plot ( (x ** 2 ,),
271272 (- x , x ** 3 ),
272- ( theta ,
273- 1. / np .cos (theta ) + a * np .cos (theta ), # broadcasted. dim=(7,1000)
273+ ( rho ,
274+ 1. / np .cos (rho ) + a * np .cos (rho ), # broadcasted. dim=(7,1000)
274275
275276 dict ( _with = 'lines' ,
276277 set = 'polar' ,
You can’t perform that action at this time.
0 commit comments