Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

TST Fixes test_partial_fit_oneclass #19814

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

Conversation

thomasjpfan
Copy link
Member

Reference Issues/PRs

Fixes #19810

What does this implement/fix? Explain your changes.

Instead of using the id on data, this PR uses object identity of coef_. I noticed sometimes the following would fail, while using d is c still returns True.

import numpy as np
c = np.random.randn(1000)
d = c
assert id(d.data) == id(c.data)

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

thanks @thomasjpfan

Copy link
Member

@jeremiedbb jeremiedbb 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 @thomasjpfan !

I noticed sometimes the following would fail

I'd be interested to know how it can happen

@jeremiedbb jeremiedbb merged commit 246795f into scikit-learn:main Apr 8, 2021
thomasjpfan added a commit to thomasjpfan/scikit-learn that referenced this pull request Apr 19, 2021
@glemaitre glemaitre mentioned this pull request Apr 22, 2021
12 tasks
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.

test_partial_fit_oneclass[SparseSGDOneClassSVM] failures
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.