Skip to content

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

@Rmadeye

Description

@Rmadeye

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ł

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions