Skip to content

Commit db9de97

Browse files
v0.0.9
1 parent 71550ac commit db9de97

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from setuptools import setup, find_packages
88
from pybind11.setup_helpers import Pybind11Extension, build_ext
99

10-
__version__ = "0.0.8"
10+
__version__ = "0.0.9"
1111

1212
def main():
1313
cwd = os.path.dirname(os.path.abspath(__file__))
@@ -18,7 +18,7 @@ def main():
1818

1919
ext_modules = [
2020
Pybind11Extension(
21-
"tensor_array._ext",
21+
"tensor_array.tensor2",
2222
sources = glob.glob(os.path.join("cpp", "*.cc")),
2323
include_dirs=[tensor_array_lib_path + "/include"],
2424
library_dirs=[tensor_array_lib_path + "/lib/tensor-array", tensor_array_lib_path + "/lib64/tensor-array"],

src/tensor_array/core/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def zeros(shape : tuple, dtype : DataTypes = DataTypes.S_INT_32) -> Tensor:
1717
Tensor: A tensor filled with zeros.
1818
"""
1919

20-
from .._ext.tensor2 import zeros as _zeros
20+
from ..tensor2 import zeros as _zeros
2121
return _zeros(shape, dtype)
2222

2323
def rand(shape : tuple, seed: int = 0) -> Tensor:
@@ -32,5 +32,5 @@ def rand(shape : tuple, seed: int = 0) -> Tensor:
3232
Tensor: A tensor filled with random values.
3333
"""
3434

35-
from .._ext.tensor2 import rand as _rand
35+
from ..tensor2 import rand as _rand
3636
return _rand(shape, seed)

src/tensor_array/core/datatypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# The DataTypes enum includes types such as BOOL, INT, FLOAT, DOUBLE, and others, which correspond to the data types used in tensors.
55
"""
66

7-
from .._ext.tensor2 import DataType as _DataType
7+
from ..tensor2 import DataType as _DataType
88
from enum import Enum
99

1010
class DataTypes(Enum):

src/tensor_array/core/operator.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def add(value_1 : Tensor, value_2 : Tensor) -> Tensor:
1515
Returns:
1616
Tensor: A tensor that is the element-wise sum of value_1 and value_2
1717
"""
18-
from .tensor2 import add as _add
18+
from ..tensor2 import add as _add
1919
return _add(value_1, value_2)
2020

2121
def divide(value_1 : Tensor, value_2 : Tensor) -> Tensor:
@@ -27,7 +27,7 @@ def divide(value_1 : Tensor, value_2 : Tensor) -> Tensor:
2727
Returns:
2828
Tensor: A tensor that is the element-wise division of value_1 by value_2
2929
"""
30-
from .tensor2 import divide as _divide
30+
from ..tensor2 import divide as _divide
3131
return _divide(value_1, value_2)
3232

3333
def multiply(value_1 : Tensor, value_2 : Tensor) -> Tensor:
@@ -39,7 +39,7 @@ def multiply(value_1 : Tensor, value_2 : Tensor) -> Tensor:
3939
Returns:
4040
Tensor: A tensor that is the element-wise product of value_1 and value_2
4141
"""
42-
from .tensor2 import multiply as _multiply
42+
from ..tensor2 import multiply as _multiply
4343
return _multiply(value_1, value_2)
4444

4545
def power(value_1 : Tensor, value_2 : Tensor) -> Tensor:
@@ -51,7 +51,7 @@ def power(value_1 : Tensor, value_2 : Tensor) -> Tensor:
5151
Returns:
5252
Tensor: A tensor that is the element-wise result of value_1 raised to the power of value_2
5353
"""
54-
from .tensor2 import power as _power
54+
from ..tensor2 import power as _power
5555
return _power(value_1, value_2)
5656

5757
def matmul(value_1 : Tensor, value_2 : Tensor) -> Tensor:
@@ -63,7 +63,7 @@ def matmul(value_1 : Tensor, value_2 : Tensor) -> Tensor:
6363
Returns:
6464
Tensor: A tensor that is the result of matrix multiplication between value_1 and value_2
6565
"""
66-
from .._ext.tensor2 import matmul as _matmul
66+
from ..tensor2 import matmul as _matmul
6767
return _matmul(value_1, value_2)
6868

6969
def condition(condition_value : Tensor, value_if_true : Tensor, value_if_false : Tensor) -> Tensor:
@@ -76,5 +76,5 @@ def condition(condition_value : Tensor, value_if_true : Tensor, value_if_false :
7676
Returns:
7777
Tensor: A tensor that is either value_if_true or value_if_false, depending on the condition.
7878
"""
79-
from .._ext.tensor2 import condition as _condition
79+
from ..tensor2 import condition as _condition
8080
return _condition(condition_value, value_if_true, value_if_false)

src/tensor_array/core/tensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"""
66

77
from __future__ import annotations
8-
from .._ext.tensor2 import Tensor as _Tensor
8+
from ..tensor2 import Tensor as _Tensor
99
from .datatypes import DataTypes
1010

1111
class Tensor(_Tensor):

0 commit comments

Comments
 (0)