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

Error in the demonstrated example (py3.5, spyder) #6

Closed
AbhishekHP2016 opened this issue May 30, 2017 · 2 comments
Closed

Error in the demonstrated example (py3.5, spyder) #6

AbhishekHP2016 opened this issue May 30, 2017 · 2 comments

Comments

@AbhishekHP2016
Copy link

When I run this code:
import numpy as np
import DBSCAN_multiplex as DB
data = np.random.randn(15000, 7)
N_iterations = 50
N_sub = 9 * data.shape[0] / 10
subsamples_matrix = np.zeros((N_iterations, N_sub), dtype = float)#int)
for i in range(N_iterations):
subsamples_matrix[i] = np.random.choice(data.shape[0], N_sub, replace = False)
eps, labels_matrix = DB.DBSCAN(data, minPts = 3, subsamples_matrix = subsamples_matrix, verbose = True)

TypeError: 'float' object cannot be interpreted as an integer

@GGiecold-zz
Copy link
Owner

GGiecold-zz commented May 30, 2017 via email

@kingbuuhuu
Copy link

Just add a np.ceil to N_sub and replace every xrange by range in the example and the DBSCAN_multiplex.py to make it work in python 3.

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

3 participants