Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Enum classes and their inheritance #243

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arrayfire/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@
from .library import get_size_of # noqa : E401
from .library import safe_call # noqa : E401
from .library import set_backend # noqa : E401
from .library import to_str # noqa : E401
# =============================================================================
# Machine Learning (ML) module
# =============================================================================
Expand Down Expand Up @@ -445,7 +446,6 @@
from .util import number_dtype # noqa : E401
from .util import to_c_type # noqa : E401
from .util import to_dtype # noqa : E401
from .util import to_str # noqa : E401
from .util import to_typecode # noqa : E401

try:
Expand Down
6 changes: 2 additions & 4 deletions arrayfire/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
from .library import backend, safe_call
from .library import (
Dtype, Source, c_bool_t, c_char_ptr_t, c_dim_t, c_double_t, c_int_t, c_longlong_t, c_pointer, c_size_t, c_uint_t,
c_ulonglong_t, c_void_ptr_t)
c_ulonglong_t, c_void_ptr_t, to_str)
from .util import (
_is_number, dim4, dim4_to_tuple, implicit_dtype, to_c_type, to_dtype, to_str, to_typecode, to_typename)
_is_number, dim4, dim4_to_tuple, implicit_dtype, to_c_type, to_dtype, to_typecode, to_typename)

_is_running_in_py_charm = "PYCHARM_HOSTED" in os.environ

Expand Down Expand Up @@ -1490,5 +1490,3 @@ def read_array(filename, index=None, key=None):
elif key is not None:
safe_call(backend.get().af_read_array_key(c_pointer(out.arr), filename.encode('utf-8'), key.encode('utf-8')))
return out


5 changes: 2 additions & 3 deletions arrayfire/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"""

from .array import Array
from .library import backend, safe_call, c_bool_t, c_char_t, c_dim_t, c_int_t, c_pointer, c_size_t, c_void_ptr_t
from .util import to_str
from .library import (
backend, c_bool_t, c_char_t, c_dim_t, c_int_t, c_pointer, c_size_t, c_void_ptr_t, safe_call, to_str)


def init():
Expand Down Expand Up @@ -506,4 +506,3 @@ def free_pinned(ptr):
"""
cptr = c_void_ptr_t(ptr)
safe_call(backend.get().af_free_pinned(cptr))

Loading