Skip to content

Commit ed13da0

Browse files
committed
DOC: more enhancedperf fixes
1 parent 8ec1c99 commit ed13da0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

doc/source/enhancingperf.rst

+5-2
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ Numba works by generating optimized machine code using the LLVM compiler infrast
311311

312312
As of ``numba`` version 0.20, pandas objects cannot be passed directly to numba-compiled functions. Instead, one must pass the ``numpy`` array underlying the ``pandas`` object to the numba-compiled function as demonstrated below.
313313

314-
jit
314+
Jit
315315
~~~
316316

317317
Using ``numba`` to just-in-time compile your code. We simply take the plain python code from above and annotate with the ``@jit`` decorator.
@@ -352,7 +352,7 @@ Note that we directly pass ``numpy`` arrays to the numba function. ``compute_num
352352
In [4]: %timeit compute_numba(df)
353353
1000 loops, best of 3: 798 us per loop
354354
355-
vectorize
355+
Vectorize
356356
~~~~~~~~~
357357

358358
``numba`` can also be used to write vectorized functions that do not require the user to explicitly
@@ -383,6 +383,9 @@ Consider the following toy example of doubling each observation:
383383
In [7]: %timeit df['col1_doubled'] = double_every_value_withnumba(df.a.values)
384384
1000 loops, best of 3: 145 us per loop
385385
386+
Caveats
387+
~~~~~~~
388+
386389
.. note::
387390

388391
``numba`` will execute on any function, but can only accelerate certain classes of functions.

0 commit comments

Comments
 (0)