rd4com/mojo-learning

Good job!

Closed this issue ยท 1 comments

Neatly done. ๐Ÿ‘ https://github.com/rd4com/mojo-learning/blob/main/Next%20steps/python_mojo_numpy_simd_cosine.md.
Can you please let me know the reference you had from Mojo docs for implementing this? I would like to read about this too.

rd4com commented

Sure @cheburakshu ,

https://docs.modular.com/mojo/stdlib/python/object.html

.to_float64()
self.lib.__getattr__(key)

https://docs.modular.com/mojo/stdlib/python/python.html#import_module

Python.import_module

https://docs.modular.com/mojo/stdlib/builtin/simd.html

SIMD[DType.float64,256]() 

external docs

When you import a python library basically, it is a PythonObject(https://docs.modular.com/mojo/stdlib/python/object.html), when you make calls on that object, mojo try yo look in the python world where thoses functions are, for example the numpy functions are in the python world, so their documentation is on the Numpy website and not mojo.

see:
https://github.com/rd4com/mojo-learning/blob/main/Python_land_and_mojo_land__introduction_with_numpy_and_matplotlib.md