Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 785 Bytes

intro.md

File metadata and controls

26 lines (17 loc) · 785 Bytes

Array Libraries Interoperability

This is a small sample tutorial to give you a feel for how the future of array consumer and provider libraries may look after the adoption of Array API.

No more fiddling around with docs when switching an implementation from one array/tensor framework to another. Simply change the import and switch your array/tensor implementation library:

import torch as xp
# or
import numpy.array_api as xp


a = xp.arange(3)
b = xp.ones(3)

c = a + b

Check out the Array API Prototype Demo page bundled with this book to see the real use case with a library like SciPy.

:::{note} Python Array API is currently under development and the demo here is only a prototype. :::