Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH] speed up
BaseSplitter
boilerplate (#5063)
This PR speeds up the checks and conversions boilerplate in `BaseSplitter`. * avoids unnecessary checks to detect mtype, by replacing `convert_to` by a more specific `convert` * prevents unnecessary metadata computation in `check_is_scitype` by adjusting the requested metadata argument to none To effect this, adds an argument and logic to `convert` and `convert_to` that allows to return the mtype of the object that was returned - this is not immediate from the arguments, as the `to_type` can be an allow-list. Related, and depends on (for changes to `convert`): #5036
- Loading branch information
Showing
3 changed files
with
41 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters