8000 API rename force_all_finite into ensure_all_finite in check_array ? · Issue #29262 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content
API rename force_all_finite into ensure_all_finite in check_array ? #29262
Closed
@jeremiedbb

Description

@jeremiedbb

check_array has several parameters that just enable a check on a property of the array, like ensure_2d, ensure_min_samples, ... They have no effect on the output array: they just have the effect to raise an error or not. They usually have the naming pattern ensure_xxx which I think is intuitive and explicit.

force_all_finite is another example of such behavior but doesn't follow the same naming pattern. I think it should be renamed ensure_all_finite.

  • it would make the current set of params more consistent, intuitive and self explanatory.
  • it would allow to add new params with the naming pattern force_xxx, that have a different behavior e.g. have an effect on the output array, without bringing confusion. This is for instance the case in FEA Add writeable parameter to check_array #29018 that proposes to add force_writeable.

cc @thomasjpfan

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0