Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on CuPy: NumPy and SciPy for GPU. Parent comment
CuPy is an (almost) drop-in replacement for NumPy, so the following works surprisingly often:
if use_cpu: import numpy as np else: import cupy as np
This is the problem with these kind of methods. It works, until it doesn't in an unknown way.
CuPy is an (almost) drop-in replacement for NumPy, so the following works surprisingly often: