Skip to content

Commit 4e50fe8

Browse files
authored
Move array_object to library (#3)
1 parent 000d168 commit 4e50fe8

File tree

11 files changed

+12
-12
lines changed

11 files changed

+12
-12
lines changed

arrayfire/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
"int16", "int32", "int64", "uint8", "uint16", "uint32", "uint64", "float32", "float64",
66
"complex64", "complex128", "bool"]
77

8-
from .array.array_object import Array
98
from .dtypes import bool, complex64, complex128, float32, float64, int16, int32, int64, uint8, uint16, uint32, uint64
9+
from .library.array_object import Array

arrayfire/array/__init__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

arrayfire/dtypes/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Tuple, Union
22

3-
from ..array.array_object import Array
3+
from ..library.array_object import Array
44
from . import Dtype
55

66
# TODO implement functions

arrayfire/library/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
__all__ = ["Array"]
2+
3+
from .array_object import Array

arrayfire/array/array_object.py renamed to arrayfire/library/array_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from ..dtypes import bool as af_bool
1616
from ..dtypes import float32 as af_float32
1717
from ..dtypes.helpers import Dtype, c_api_value_to_dtype, str_to_dtype
18-
from ..library.device import PointerSource
18+
from .device import PointerSource
1919

2020
# TODO use int | float in operators -> remove bool | complex support
2121

arrayfire/library/operators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Callable
22

33
from .. import backend
4-
from ..array.array_object import Array
4+
from .array_object import Array
55

66

77
class return_copy:

arrayfire/library/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Tuple, Union
22

3-
from ..array.array_object import Array
3+
from .array_object import Array
44

55
# TODO implement functions
66

tests/array_object/test_initialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
import pytest
66

7-
from arrayfire.array.array_object import Array
87
from arrayfire.dtypes import Dtype, float32, int16
8+
from arrayfire.library.array_object import Array
99

1010
# TODO add tests for array arguments: device, offset, strides
1111
# TODO add tests for all supported dtypes on initialisation

tests/array_object/test_methods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from arrayfire.array.array_object import Array
1+
from arrayfire.library.array_object import Array
22

33
# TODO add more tests for different dtypes
44

tests/array_object/test_operators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
import pytest
55

6-
from arrayfire.array.array_object import Array
76
from arrayfire.dtypes import bool as af_bool
7+
from arrayfire.library.array_object import Array
88

99
Operator = Callable[[Union[int, float, Array], Union[int, float, Array]], Array]
1010

0 commit comments

Comments
 (0)