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

TypeError: '>=' not supported between instances of 'numpy.ndarray' and 'str' for min_samples #8

Open
Rmadeye opened this issue Jul 6, 2023 · 0 comments

Comments

@Rmadeye
Copy link

Rmadeye commented Jul 6, 2023

Hello,
I encountered an error trying to run command:

python ./AF_Cluster/scripts/ClusterMSA.py -i input.a3m  -o ./test_r15w/ --scan  --min_samples 5 --run_PCA r15w 

it yields:

  File "/home/users/rmadaj/anaconda3/envs/util/lib/python3.9/site-packages/sklearn/cluster/_dbscan.py", line 388, in fit
    core_samples = np.asarray(n_neighbors >= self.min_samples, dtype=np.uint8)
TypeError: '>=' not supported between instances of 'numpy.ndarray' and 'str'

As it came out, fix is just adding type=int at declaring args for argparse:

    p.add_argument('--min_samples', action='store',default=3, help='Default min_samples for DBSCAN (Default 3, recommended no lower than that).', **type=int**)

Just if somebody had problems declaring minimum samples :)

Regards,
Rafał

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