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: rac(): incompatible function arguments. #4

Open
tomleung1996 opened this issue Nov 29, 2023 · 2 comments
Open

TypeError: rac(): incompatible function arguments. #4

tomleung1996 opened this issue Nov 29, 2023 · 2 comments

Comments

@tomleung1996
Copy link

I ran into an error when I was trying to use the sample code:

X = np.random.random((10000, 768))
labels = racplusplus.rac(
  X, max_merge_distance=.24, connectivity=None, batch_size=1000, no_processors=8, distance_metric="cosine"
)

Error:

TypeError                                 Traceback (most recent call last)
Cell 10 line 2
    
TypeError: rac(): incompatible function arguments. The following argument types are supported:
    1. (arg0: numpy.ndarray[numpy.float64[m, n]], arg1: float, arg2: object, arg3: int, arg4: int, arg5: str) -> numpy.ndarray

Invoked with: array([[0.6976868 , 0.67114469, 0.86574914, ..., 0.11234943, 0.2656756 ,
        0.28365873],
       [0.90549301, 0.71009645, 0.89945103, ..., 0.64634767, 0.82557997,
        0.87272555],
       [0.42725098, 0.42255158, 0.94242929, ..., 0.82912421, 0.03063599,
        0.47634264],
       ...,
       [0.83883261, 0.02404994, 0.73920084, ..., 0.28359129, 0.42741765,
        0.13702825],
       [0.38300785, 0.85978371, 0.0691742 , ..., 0.39573976, 0.07083835,
        0.87847463],
       [0.07231579, 0.49157908, 0.62391148, ..., 0.04350661, 0.53439326,
        0.19267565]]); kwargs: max_merge_distance=0.24, connectivity=None, batch_size=1000, no_processors=8, distance_metric='cosine'
@ericbugin1
Copy link

I got this as well

@gijshendriksen
Copy link

I had the same issue, but removing the argument names did the trick for me.

labels = racplusplus.rac(X, .24, None, 1000, 8, "cosine")

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