Closed
Description
The current workaround for enums, when the enum
package is not available fails in certain situation, e.g.:
import arrayfire
arrayfire.pow(arrayfire.randu(3,3),3)
/Library/Python/2.7/site-packages/arrayfire-3.3.0-py2.7.egg/arrayfire/array.pyc in constant_array(val, d0, d1, d2, d3, dtype)
71 dtype = ct.c_int(dtype.value)
72 else:
---> 73 raise TypeError("Invalid dtype")
74
75 out = ct.c_void_p(0)
TypeError: Invalid dtype
The reason for this is that isinstance(dtype, Dtype) == False
if enum
is not present and True
otherwise.
Metadata
Metadata
Assignees
Labels
No labels