Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tehrengruber/33b0e1c27e39dc63fc42c7be12b86cc9 to your computer and use it in GitHub Desktop.
Save tehrengruber/33b0e1c27e39dc63fc42c7be12b86cc9 to your computer and use it in GitHub Desktop.
import numpy as np
import cupy as cp
import gt4py as gt
test = gt.storage.zeros(backend="gtcuda", dtype=np.float32,
shape=(14, 15, 16), default_origin=(0, 0, 0))
test[0:8, 0:8, 0:8] = 1
test.synchronize()
slic = test[4:12, 4:12, 4:12]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment