Fix
This meets the expectation that the embeddings passed to optimize_layout are float32. In the typical case, where they are float32, this should be no cost. When the stored embedding is not float32, this is a pretty cheap operation.
@@ -1709,7 +1709,7 @@ class UMAP(BaseEstimator):
embedding = optimize_layout(
embedding,
- self.embedding_,
+ self.embedding_.astype(np.float32, copy=False), # Fix #179
head,
tail,
n_epochs,
