Replace `np.rollaxis()` with `np.moveaxis()` but it is not drop-in replacement
NumPy documentation recommends using np.moveaxis() instead of np.rollaxis(). Currently astropy uses np.rollaxis() more than np.moveaxis(), but there is no reason we should not follow NumPy's recommendation. The lines of code that call np.rollaxis() can be found with git grep 'rollaxis('. The following sub-packages need to be updated:
- [ ]
modeling– some work completed, but needs review - [ ]
stats– #15727 - [ ]
time– #15727
Pull requests can replace np.rollaxis() with np.moveaxis() in one or more sub-packages.
I would like to work on time.
@TanviPooranmal by all means, feel free to ! Thank you !
I've addressed the feedback provided in astropy/astropy#15727.
Maybe need some recommendations how to correctly translate the functions' signatures, as with a variable input to np.rollaxis(arr, axis, start) the effect of a given start is not always straightforward to infer.
Given that in the remaining subpackage to be worked on, modeling, from a quick glance refactoring does not look trivial in at least some cases, I'd rather remove the good-first-issue and package-novice labels now.
We have two PRs now trying to do simple search and replace. I updated the title to explain it is not that easy.
Hi ! Is this issue still open to work upon ??
Hi @vagish-yadav , two subpackages have already been addressed, and some work on modeling has been done, but that one definitely needs further review and debugging. Please note that some of the refactoring for modeling is non-trivial and would best be tackled by someone with a bit of coding experience.
hello guys, can i try to help on this?
Hi, im new to the project. I could work on the modeling package. Am i allowed to contribute?