Integration of backend python libraries with SageMath

45 views
Skip to first unread message

PRIYAL AWANKAR

unread,
Apr 15, 2022, 5:55:14 AM4/15/22
to sage-gsoc
Respected Sir,
           I am stuck on the integration of python libraries in sage (For idea: Tensor operations in Sage using Python libraries as backends). How would we include the custom written libraries to achieve the required results?  I am performing all these sage tasks on Linux. So accordingly please guide me.

Thanks and Regards,
Priyal Awankar

Matthias Köppe

unread,
Apr 17, 2022, 7:05:22 PM4/17/22
to sage-gsoc
Sage already uses numpy, so the new code can just import it.
If in your project you need another Python library, perhaps pytorch,
you can just install it like this: "./sage -pip install torch". Then
code can import it.
Later it can be added to Sage by creating package metadata in
build/pkgs - see
https://doc.sagemath.org/html/en/developer/packaging.html
Reply all
Reply to author
Forward
0 new messages