Skip to content

Tag: cupy

Difference between cupy.asnumpy() and get()

Given a CuPy array a, there are two ways to get a numpy array from it: a.get() and cupy.asnumpy(a). Is there any practical difference between them? Answer cp.asnumpy is a wrapper calling ndarray.get. You can see that in the code of cp.asnumpy: As you can see (both in the documentation and in the code), cp.asn…