to_numpy with Mojo 24.5
I try to convert the
The orginal method is implemented as follows:
I replaced
Any advice highly appreciated
to_numpy method from the Mojo 24.4 based KMeans tutorial https://www.modular.com/blog/fast-k-means-clustering-in-mojo-guide-to-porting-python-to-mojo-for-accelerated-k-means-clustering to Mojo 24.5 but get the following error: The orginal method is implemented as follows:
I replaced
DTypePointer[dtype] with UnsafePointer[Scalar[dtype]]Any advice highly appreciated
There are several clustering algorithms, but k-means — the algorithm we're going to implement from scratch in Python and Mojo
in this blog post — is one of the most popular due to its simplicity and ease of implementation.

