Remove deprecated mlab code#12165
Conversation
8ee4db9 to
6a89da9
Compare
|
This is going to be a monster diff by the time it's done! |
|
Fun but scary! |
| Lots of code inside the :mod:`matplotlib.mlab` module which was deprecated | ||
| in Matplotlib 2.2 has been removed. See below for a list: | ||
|
|
||
| - `mlab.logspace` (use numpy.logspace instead) |
There was a problem hiding this comment.
The former should be inline-code formatting (since there's nothing to link to now) and the replacement should be a link (since we should have intersphinx for these.)
There was a problem hiding this comment.
I'll fix this all in one go at the end
| ## We are still importing too many things from mlab; more cleanup is needed. | ||
|
|
||
| from matplotlib.mlab import ( | ||
| amap, base_repr, binary_repr, bivariate_normal, center_matrix, csv2rec, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
0010d18 to
efa385f
Compare
27f94c7 to
ddf38fe
Compare
|
If CI passes, I think this is ready to be reviewed! |
|
|
||
| return ind | ||
|
|
||
| def dist(self, x, y): |
There was a problem hiding this comment.
make these free-standing functions instead of methods?
| @@ -2231,8 +2231,7 @@ def plotfile(fname, cols=(0,), plotfuncs=None, | |||
| columns. | |||
|
|
|||
| *comments*, *skiprows*, *checkrows*, *delimiter*, and *names* | |||
There was a problem hiding this comment.
You're probably going to have to copy these definitions in now since there's not going to be a csv2rec link.
| - ``ispower2`` | ||
| - ``isvector`` | ||
| - ``l1norm`` | ||
| - ``l2norm`` |
There was a problem hiding this comment.
There's a replacement for these two norms above.
There was a problem hiding this comment.
Ahh, thanks for catching these!
| - ``frange`` (use `numpy.arange` instead) | ||
| - ``get_sparse_matrix`` | ||
| - ``get_xyz_where`` | ||
| - ``griddata`` |
There was a problem hiding this comment.
There's a replacement for this above.
| - ``dist_point_to_segment`` | ||
| - ``distances_along_curve`` | ||
| - ``entropy`` (use `scipy.stats.entropy` instead) | ||
| - ``exp_safe`` |
There was a problem hiding this comment.
There's a replacement for this above.
jklymak
left a comment
There was a problem hiding this comment.
This looks good to me. Lets merge; it could use a workout on master sooner rather than later I imagine...
| - ``binary_repr`` | ||
| - ``bivariate_normal`` | ||
| - ``center_matrix`` | ||
| - ``csv2rec`` (use `numpy.recarray.tofile` instead) |
There was a problem hiding this comment.
Does csv2rec have a replacement? tofile seems like a replacement for rec2csv not csv2rec.
There was a problem hiding this comment.
I suggest using pandas instead. If you really need csv -> record array the best course of action is probably to vendor the code to your project.
If I remember correctly we do 2 major cycles for deprecation, which means it's time to get rid of lots of
mlabcode! I plan on doing this bit by bit, but I'll leave the PR open so CI gets run after each bit I do to check nothing breaks.