We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7935ed9 commit cafc208Copy full SHA for cafc208
arrayfire/interop.py
@@ -27,18 +27,19 @@
27
28
AF_NUMPY_FOUND=True
29
30
- _nptype_to_aftype = {'f4' : Dtype.f32,
+ _nptype_to_aftype = {'b1' : Dtype.b8,
31
+ 'u1' : Dtype.u8,
32
+ 'u2' : Dtype.u16,
33
+ 'i2' : Dtype.s16,
34
+ 's4' : Dtype.u32,
35
+ 'i4' : Dtype.s32,
36
+ 'f4' : Dtype.f32,
37
+ 'c8' : Dtype.c32,
38
+ 's8' : Dtype.u64,
39
+ 'i8' : Dtype.s64,
40
'f8' : Dtype.f64,
- 'b1' : Dtype.b8,
- 'u1' : Dtype.u8,
- 'i4' : Dtype.s32,
- 's4' : Dtype.u32,
- 'i8' : Dtype.s64,
- 's8' : Dtype.u64,
- 'c8' : Dtype.c32,
41
'c16' : Dtype.c64}
42
-
43
def np_to_af_array(np_arr):
44
"""
45
Convert numpy.ndarray to arrayfire.Array.
0 commit comments