M
Modular3mo ago
Sam.H.W

Unable to run the kmean blog example.

I am not able to build the example here with mojo 24.4.0: https://github.com/modularml/devrel-extras/tree/main/blogs/mojo-kmeans-from-python
GitHub
devrel-extras/blogs/mojo-kmeans-from-python at main · modularml/dev...
Contains supporting materials for developer relations blog posts, videos, and workshops - modularml/devrel-extras
2 Replies
PhoToN 飞得高
@Sam.H.W the main problems I see from the Error text file you have provided is importing problems. In the latest Mojo version, some of these math functions were moved around if I am not wrong. For example, 1) You should use SIMD.__div__ instead of math.div in above case. 2) slice.__len()__ has been removed in 24.4 and you have to calculate it explicitly instead.
PhoToN 飞得高
For all the changes, Please look at “Standard library changes” in the latest change log here, https://docs.modular.com/mojo/changelog Kmeans should work once you implement these changes.
Mojo🔥 changelog | Modular Docs
A history of significant Mojo changes.
Want results from more Discord servers?
Add your server