Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdb9de97

Browse files
v0.0.9
1 parent71550ac commitdb9de97

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
fromsetuptoolsimportsetup,find_packages
88
frompybind11.setup_helpersimportPybind11Extension,build_ext
99

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

1212
defmain():
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.tensor2importzerosas_zeros
20+
from ..tensor2importzerosas_zeros
2121
return_zeros(shape,dtype)
2222

2323
defrand(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.tensor2importrandas_rand
35+
from ..tensor2importrandas_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.tensor2importDataTypeas_DataType
7+
from ..tensor2importDataTypeas_DataType
88
fromenumimportEnum
99

1010
classDataTypes(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 .tensor2importaddas_add
18+
from ..tensor2importaddas_add
1919
return_add(value_1,value_2)
2020

2121
defdivide(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 .tensor2importdivideas_divide
30+
from ..tensor2importdivideas_divide
3131
return_divide(value_1,value_2)
3232

3333
defmultiply(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 .tensor2importmultiplyas_multiply
42+
from ..tensor2importmultiplyas_multiply
4343
return_multiply(value_1,value_2)
4444

4545
defpower(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 .tensor2importpoweras_power
54+
from ..tensor2importpoweras_power
5555
return_power(value_1,value_2)
5656

5757
defmatmul(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.tensor2importmatmulas_matmul
66+
from ..tensor2importmatmulas_matmul
6767
return_matmul(value_1,value_2)
6868

6969
defcondition(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.tensor2importconditionas_condition
79+
from ..tensor2importconditionas_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__importannotations
8-
from .._ext.tensor2importTensoras_Tensor
8+
from ..tensor2importTensoras_Tensor
99
from .datatypesimportDataTypes
1010

1111
classTensor(_Tensor):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp