##// END OF EJS Templates
Creates newlines in the %%timeit documentation (#14556)...
M Bussonnier -
r28913:e63a316e merge
parent child Browse files
Show More
@@ -195,12 +195,16 b' class ExecutionMagics(Magics):'
195 195
196 196 """Run a statement through the python code profiler.
197 197
198 Usage, in line mode:
198 **Usage, in line mode:**
199
199 200 %prun [options] statement
200 201
201 Usage, in cell mode:
202 **Usage, in cell mode:**
203
202 204 %%prun [options] [statement]
205
203 206 code...
207
204 208 code...
205 209
206 210 In cell mode, the additional code lines are appended to the (possibly
@@ -1028,12 +1032,17 b' class ExecutionMagics(Magics):'
1028 1032 def timeit(self, line='', cell=None, local_ns=None):
1029 1033 """Time execution of a Python statement or expression
1030 1034
1031 Usage, in line mode:
1035 **Usage, in line mode:**
1036
1032 1037 %timeit [-n<N> -r<R> [-t|-c] -q -p<P> -o] statement
1033 or in cell mode:
1038
1039 **or in cell mode:**
1040
1034 1041 %%timeit [-n<N> -r<R> [-t|-c] -q -p<P> -o] setup_code
1035 code
1036 code...
1042
1043 code
1044
1045 code...
1037 1046
1038 1047 Time execution of a Python statement or expression using the timeit
1039 1048 module. This function can be used both as a line and cell magic:
@@ -1046,6 +1055,7 b' class ExecutionMagics(Magics):'
1046 1055 body has access to any variables created in the setup code.
1047 1056
1048 1057 Options:
1058
1049 1059 -n<N>: execute the given statement <N> times in a loop. If <N> is not
1050 1060 provided, <N> is determined so as to get sufficient accuracy.
1051 1061
@@ -1066,7 +1076,7 b' class ExecutionMagics(Magics):'
1066 1076 -q: Quiet, do not print result.
1067 1077
1068 1078 -o: return a TimeitResult that can be stored in a variable to inspect
1069 the result in more details.
1079 the result in more details.
1070 1080
1071 1081 .. versionchanged:: 7.3
1072 1082 User variables are no longer expanded,
General Comments 0
You need to be logged in to leave comments. Login now