DepthTensor 1.4.0__tar.gz → 1.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {depthtensor-1.4.0/src/DepthTensor.egg-info → depthtensor-1.5.0}/PKG-INFO +1 -1
- {depthtensor-1.4.0 → depthtensor-1.5.0}/pyproject.toml +1 -1
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/__init__.py +1 -1
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/tensor.py +11 -1
- {depthtensor-1.4.0 → depthtensor-1.5.0/src/DepthTensor.egg-info}/PKG-INFO +1 -1
- depthtensor-1.5.0/src/example/example.py +5 -0
- depthtensor-1.4.0/src/example/example.py +0 -4
- {depthtensor-1.4.0 → depthtensor-1.5.0}/LICENSE +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/README.md +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/setup.cfg +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/_core/__init__.py +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/_core/exceptions.py +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/_core/ops/__init__.py +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/_core/ops/comparison.py +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/_core/ops/creation.py +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/_core/ops/diff.py +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/_core/ops/elementwise.py +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/_core/ops/reduction.py +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/_core/random/__init__.py +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/_core/random/generator.py +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/_core/utils.py +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/autodiff.py +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor/typing.py +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor.egg-info/SOURCES.txt +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor.egg-info/dependency_links.txt +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor.egg-info/requires.txt +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/src/DepthTensor.egg-info/top_level.txt +0 -0
- {depthtensor-1.4.0 → depthtensor-1.5.0}/tests/test_tensor.py +0 -0
|
@@ -5,7 +5,8 @@ from typing import (
|
|
|
5
5
|
Any,
|
|
6
6
|
Tuple,
|
|
7
7
|
Callable,
|
|
8
|
-
overload
|
|
8
|
+
overload,
|
|
9
|
+
Iterator
|
|
9
10
|
)
|
|
10
11
|
|
|
11
12
|
from .typing import (
|
|
@@ -787,6 +788,15 @@ class Tensor():
|
|
|
787
788
|
### Misc dunder
|
|
788
789
|
###
|
|
789
790
|
|
|
791
|
+
def __getitem__(self, index) -> Any:
|
|
792
|
+
return self.data[index]
|
|
793
|
+
|
|
794
|
+
def __setitem__(self, index, value) -> Any:
|
|
795
|
+
self.data[index] = value
|
|
796
|
+
|
|
797
|
+
def __iter__(self) -> Iterator:
|
|
798
|
+
return iter(self.data)
|
|
799
|
+
|
|
790
800
|
def __repr__(self) -> str:
|
|
791
801
|
return f'Tensor({self.data}, device={self.device})'
|
|
792
802
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|