raptor
raptor copied to clipboard
raptor/cluster_utils.py line 111 AttributeError: 'bool' object has no attribute 'all'
These lines:
indices = np.where(
(embeddings == local_cluster_embeddings_[:, None]).all(-1)
)[1]
are producing this error:
AttributeError: 'bool' object has no attribute 'all'
Background:
both embeddings and local_cluster_embeddings_ are of type numpy.ndarray embeddings.shape: (507362, 768) local_cluster_embeddings.shape: (749, 768) local_cluster_embeddings[:, None].shape: (749, 1, 768)
so an apparent shape mis-match?
embeddings == local_cluster_embeddings_[:, None]: False (embeddings == local_cluster_embeddings_[:, None]): False
so no all(), hence
(embeddings == local_cluster_embeddings_[:, None]).all(-1): ERROR!
If I knew what this was supposed to do (i.e., get the indices of the nodes in the local cluster maybe?) I could maybe work around this. But right now I'm flubbered as to what is going wrong and what it's supposed to do!