8000 ENH TfidfTransformer perserves np.float32 dtype by glemaitre · Pull Request #28136 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

ENH TfidfTransformer perserves np.float32 dtype #28136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jan 18, 2024

Conversation

glemaitre
Copy link
Member
@glemaitre glemaitre commented Jan 15, 2024

Towards #11000

Follow-up to #18843

This PR allows the TfidfTransformer to make the computation using np.float32 without additional conversion.

As a free launch, the TfidfVectorizer should make less copy when setting dtype=np.float32.

Copy link
github-actions bot commented Jan 15, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 70848bc. Link to the linter CI: here

Copy link
Member
@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor
@OmarManzoor OmarManzoor left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @glemaitre. Should we have some tests to check the preservation?

8000
Copy link
Contributor
@OmarManzoor OmarManzoor left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @glemaitre

@OmarManzoor OmarManzoor merged commit fe5ba6f into scikit-learn:main Jan 18, 2024
glemaitre added a commit to glemaitre/scikit-learn that referenced this pull request Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging 39ED this pull request may close these issues.

4 participants
0