Perfplot extends Python's timeit by testing snippets with input parameters (e.g., the size of an array) and plotting the results. It can be found here at PyPi.
Questions tagged [perfplot]
11 questions
4
votes
1 answer
Perfplot bench() raises "TypeError: ufunc 'isfinite' not supported for the input types, and the input types"
I am using perpflot library to test the effect of DatetimeIndex on searching for a pandas dataframe.
I have defined a setup function to cretate 2 dataframes. One with datetime index and other with time as a column. I have also defined 2 functions…

harvpan
- 8,571
- 2
- 18
- 36
4
votes
4 answers
Compute signed area of many triangles
I need to compute the signed area of many triangles in 2D, given by a numpy array of shape (2, 3, n) (x/y coordinate, node in triangle, number of triangles). I'm looking for a a way to do it fast, and the best I could come up with so far is
import…

Nico Schlömer
- 53,797
- 27
- 201
- 249
3
votes
1 answer
Perfplot to compare performance of several functions with multiple arguments (more than one)
I would like to show performance of some functions by perfplot that uses more than one arguments, but I don't know how could I do this (I'm not familiar much with perfplot). One said broadcast all args to just x, but I am confused yet how to use it.…

Ali_Sh
- 2,667
- 3
- 43
- 66
3
votes
2 answers
How is sorting faster than linear (low constant)?
I've compared the performances of some built-in sort functions in python 3 versus some algorithms that I know their performances, and I saw some unexpected results. I would like to clarify those issues.
I used the "perfplot" library to compare the…

Yuval Zilber
- 131
- 11
3
votes
2 answers
Why `vectorize` is outperformed by `frompyfunc`?
Numpy offers vectorize and frompyfunc with similar functionalies.
As pointed out in this SO-post, vectorize wraps frompyfunc and handles the type of the returned array correctly, while frompyfunc returns an array of np.object.
However, frompyfunc…

ead
- 32,758
- 6
- 90
- 153
2
votes
1 answer
How to prevent perfplot (matplotlib) graph labels from being truncated?
I'm working with the perfplot library (which you can pip-install) which benchmarks functions and plots their performance.
When observing the plotted graphs, the labels are truncated. How can I prevent this?
Here's a simple MCVE:
import perfplot…

cs95
- 379,657
- 97
- 704
- 746
1
vote
1 answer
How to add measured input values as x-axis labels in generated chart?
I'm using perfplot to make only a few measurements. I would like to see measured input values as x-axis labels similarly to generated y-axis labels.
Currently I see 10^2 10^3 10^4 10^5 10^6 10^7 as x-axis labels.
I want to have 16 512 16384 …

Karol Zlot
- 2,887
- 2
- 20
- 37
0
votes
1 answer
I tried installing perfplot using pip on jupyter notebooks, and it succesfully installed but importing throws error
The python perfplot library throws an error when i try to import it. installed using pip on jupyter notebook (i have installed many libraries this way in the past with no issues)
I installed the library.
Then I tried importing but got an…

mudders
- 23
- 3
0
votes
1 answer
How to pass a custom equality_check function into perfplot
I'm working with the perfplot library to compare the performance of three functions f1, f2 and f3. The functions are supposed to return the same values, so I want to do equality checks. However, all other examples of perfplot I can find on the…

cottontail
- 10,268
- 18
- 50
- 51
0
votes
1 answer
Accessing data that does not pass equality check on perfplot
I'm running script that compares performance of two different functions f1 and f2. It can't pass an equality_check and raises AssertionError: Equality check failure. (f1, f2). How can I access argument and outputs of functions where it…

mathfux
- 5,759
- 1
- 14
- 34
0
votes
1 answer
Perfplot raised a "TypeError: bench() got an unexpected keyword argument 'logx'". How to fix?
After a search on SO for numpy array mixed dtype filling I found a nice little numpy array fill performance tester perfplot. When the posted code answer from Nico Schlömer was ran, I saw a dip in the performance chart. So I changed the…

ZF007
- 3,708
- 8
- 29
- 48