Skip to content

API make feature_extraction's constructors' params kwonly#16866

Merged
thomasjpfan merged 4 commits intoscikit-learn:masterfrom
adrinjalali:kwarg/feature_extraction
Apr 15, 2020
Merged

API make feature_extraction's constructors' params kwonly#16866
thomasjpfan merged 4 commits intoscikit-learn:masterfrom
adrinjalali:kwarg/feature_extraction

Conversation

@adrinjalali
Copy link
Copy Markdown
Member

Towards #15005.

This is an easy one, there doesn't seem to be any parameter which should be positional, I guess.

@adrinjalali adrinjalali changed the title API make feature_extraction's constructors' params kwonly [MRG] API make feature_extraction's constructors' params kwonly Apr 8, 2020

def __init__(self, n_features=(2 ** 20), input_type="dict",
@_deprecate_positional_args
def __init__(self, *, n_features=(2 ** 20), input_type="dict",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel n_features could be positional, no strong feeling though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am +0.25 on having n_features positional.


def __init__(self, n_features=(2 ** 20), input_type="dict",
@_deprecate_positional_args
def __init__(self, *, n_features=(2 ** 20), input_type="dict",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am +0.25 on having n_features positional.

@thomasjpfan thomasjpfan changed the title [MRG] API make feature_extraction's constructors' params kwonly API make feature_extraction's constructors' params kwonly Apr 15, 2020
@thomasjpfan thomasjpfan merged commit 6cd77c2 into scikit-learn:master Apr 15, 2020
@adrinjalali adrinjalali deleted the kwarg/feature_extraction branch April 15, 2020 17:08
gio8tisu pushed a commit to gio8tisu/scikit-learn that referenced this pull request May 15, 2020
viclafargue pushed a commit to viclafargue/scikit-learn that referenced this pull request Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants