What did you do this week?
- Look at the issue Is the r-value outputted by scipy.stats.linregress always the Pearson correlation coefficient?
- WIP: ENH: improve sort_vertices_of_regions via Pythran and made it more readable
- Tyler said
test_spherical_voronoi
may test inplace sort, and it is not recommended to remove a test. In this way, we’ll never pass the test. - For the type error, I can’t reproduce it on my computer. Is it similar to the issue BUG: RBFInterpolator fails when calling it with a slice of a (1, n) array? I encountered similar `reshaped` issues before, and found that often the type is the problem while `reshaped` is not. Once I support that type, I’ll not get the error. But in the case there they do support that type.
TypeError: Invalid call to pythranized function `sort_vertices_of_regions(int32[:, :], int32 list list)' Candidates are: - sort_vertices_of_regions(int64[:,:], int64 list list) - sort_vertices_of_regions(int32[:,:], int32 list list) - sort_vertices_of_regions(int32[:,:], int64 list list) - sort_vertices_of_regions(int[:,:], int list list)
- Tyler said
- Last week we concluded
_spectral.pyx
and_sosfilt.pyx
are easy to be improved via Pythran, but later I found that_spectral.pyx
already has a version in Pythran. For_sosfilt.pyx
, I improved_sosfilt_float
and leave_sosfilt_object
in Cython. The performance for_sosfilt_float
looks similar comparing Cython and Pythran. So I'm not sure whether I need to make a PR for it - ENH: improve siegelslopes via pythran , 10x faster. If needed, I can also improve
scipy/stats/_stats_mstats_common.py
’slinregress, theilslopes
and put them withsiegelslopes
in the same file. But other two functions do not have obvious loops so here I only improve siegelslopes. - ENH: improve cspline1d, qspline1d, and relative funcs via Pythran ,10x faster.
- Segment fault on Azure pipelines. Because of calling itself in the function?
- A lot of signatures. Any more concise way?
- Actually, for those functions which have lots of signatures and also cause current segment faults -
cspline1d_eval
andqspline1d_eval
, they don’t have many loops. I improved them because they are used to evaluatecspline1d
andqspline1d
, putting them in one file may look better. We can also leave them in the original file so that we won’t get above a.& b. problems
What is coming up next?
- Keep working on ENH: improve cspline1d, qspline1d, and relative funcs via Pythran
- Find more potential algorithms and improve them
- Make a PR for
_sosfilt_float
and comment on it -
keepdims
feature support in Pythran
Did you get stuck anywhere?
I once said thatnp.expand_dims()
does not support dim as keyword, I was wrong because the key is axis, but I still got the following error. However,
np.expand_dims(x, 1)
will work.
(scipy-dev) charlotte@CHARLOTLIU-MB0 stats % pythran siegelslopes_pythran.py
CRITICAL: I am in trouble. Your input file does not seem to match Pythran's constraints...
siegelslopes_pythran.py:19:13 error: function uses an unknown (or unsupported) keyword argument `axis`
----
deltax = np.expand_dims(x, axis=1) - x
^~~~ (o_0)
----