sigpy.get_array_module

sigpy.get_array_module(array)[source]

Gets an appropriate module from numpy or cupy.

This is almost equivalent to cupy.get_array_module(). The differences are that this function can be used even if cupy is not available.

Parameters:array – Input array.
Returns:cupy or numpy is returned based on input.
Return type:module