Things To Know

Interoperability (the 10-second version): NumPy is built to work with other array libraries (including GPU tools).

It can:

  • (1) read or share other arrays without copying (via standard interfaces or np.from_dlpack(...)),
  • (2) hand off NumPy calls to those libraries so work runs on their hardware (__array_function__, __array_ufunc__, or creators with like=), and
  • (3) return the right type back so metadata and behavior are preserved.

In practice: convert explicitly when you switch tools, watch for copies vs. views, and know whether you’re on CPU or GPU.
 

For more information, please look here.