diff options
Diffstat (limited to 'vector.py')
-rw-r--r-- | vector.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/vector.py b/vector.py deleted file mode 100644 index 7b36e07..0000000 --- a/vector.py +++ /dev/null @@ -1,13 +0,0 @@ -import numpy as np -from pycuda import gpuarray - -def make_vector(arr, dtype=gpuarray.vec.float3): - if len(arr.shape) != 2 or arr.shape[-1] != 3: - raise Exception('shape mismatch') - - x = np.empty(arr.shape[0], dtype) - x['x'] = arr[:,0] - x['y'] = arr[:,1] - x['z'] = arr[:,2] - - return x |