MNT remove _safe_indexing from api_reference.py - #32728
Conversation
|
I think we should instead recognise that this is very widely used and make it public. So I'm not very happy about removing it from the API docs. |
|
@adrinjalali You misinterpret my intention. For current users of it, nothing is really changed by this PR. I am happy to add |
adrinjalali
left a comment
There was a problem hiding this comment.
I think it makes sense to have this public, it's a very useful utility and we use it everywhere (including outside sklearn). But removing from the docs has no real consequence I guess.
|
I am going to remove this from the 1.8 milestone. This can always be back-ported to the release branch or added to the the next 1.8 bug-fix release. |
I wouldn't say that it's not public. To me the fact that it's documented makes it de facto officially public. What makes it unique is that it's the only public function with a leading underscore. With that in mind, I see two options:
I don't have a strong opinion between both options but I agree that the current status is not satisfying. |
ogrisel
left a comment
There was a problem hiding this comment.
Since there is a private underscore, I think the intent to make it private was communicated a while ago and the fact that it's still documented can be considered a documentation bug.
|
@jeremiedbb ok to merge? |
That's where it's not clear. It's a documentation bug if we consider it private. But it's a naming bug if we consider it public. It doesn't imply the same actions. That's why I think we should clear that question first before taking action. Historically we've been treated like a public function: it's in the api reference and we make official deprecations for every change. |
|
Alright, then we need to survey how frequently this function is used by other projects, for instance by doing GitHub-wide public code search with some clever filters to ignore public copies of the scikit-learn code base. |
Reference Issues/PRs
Relates to #27439.
What does this implement/fix? Explain your changes.
If right now, it is officially not public, let's remove it from the public API list.
Any other comments?