Skip to content
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

signature of sklearn.datasets.make_blobs has changed #90

Open
mcepl opened this issue Mar 2, 2022 · 0 comments
Open

signature of sklearn.datasets.make_blobs has changed #90

mcepl opened this issue Mar 2, 2022 · 0 comments

Comments

@mcepl
Copy link

mcepl commented Mar 2, 2022

When running the test suite while packaging this package for openSUSE/Factory, test_base.TestMulticoreTSNE.setUpClass errors:

[   54s] ======================================================================
[   54s] ERROR: setUpClass (test_base.TestMulticoreTSNE)
[   54s] ----------------------------------------------------------------------
[   54s] Traceback (most recent call last):
[   54s]   File "/home/abuild/rpmbuild/BUILD/MulticoreTSNE-0.1/MulticoreTSNE/tests/test_base.py", line 24, in setUpClass
[   54s]     cls.Xy = make_blobs(20, 100, 2, shuffle=False)
[   54s] TypeError: make_blobs() takes from 0 to 2 positional arguments but 3 positional arguments (and 2 keyword-only arguments) were given
[   54s] 
[   54s] ----------------------------------------------------------------------

The problem is that the signature of the function has changed and only the first parameters are positional. This patch seems to help:

---
 MulticoreTSNE/tests/test_base.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/MulticoreTSNE/tests/test_base.py
+++ b/MulticoreTSNE/tests/test_base.py
@@ -21,7 +21,7 @@ def pdist(X):
 class TestMulticoreTSNE(unittest.TestCase):
     @classmethod
     def setUpClass(cls):
-        cls.Xy = make_blobs(20, 100, 2, shuffle=False)
+        cls.Xy = make_blobs(20, 100, centers=2, shuffle=False)

     def test_tsne(self):
         X, y = self.Xy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant