decent-array 0.2.0__tar.gz → 0.2.2__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.
- {decent_array-0.2.0 → decent_array-0.2.2}/PKG-INFO +1 -1
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/_array.py +8 -0
- decent_array-0.2.2/decent_array/py.typed +0 -0
- decent_array-0.2.2/docs/requirements.txt +3 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/pyproject.toml +2 -2
- {decent_array-0.2.0 → decent_array-0.2.2}/tests/test_array.py +14 -0
- decent_array-0.2.0/docs/requirements.txt +0 -3
- {decent_array-0.2.0 → decent_array-0.2.2}/.github/CODEOWNERS +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/.github/dependabot.yml +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/.github/workflows/ci.yaml +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/.gitignore +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/LICENSE +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/README.md +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/benchmarks/bench_array.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/benchmarks/bench_common.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/benchmarks/bench_iop.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/benchmarks/profile_hotpath.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/__init__.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/_constants.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/_errors.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/_utils.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/__init__.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_abstracts/__init__.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_abstracts/backend.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_backend_manager.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_iop/__init__.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_iop/bit_operators.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_iop/comparison.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_iop/creation.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_iop/linalg.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_iop/manipulations.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_iop/math.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_iop/operators.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_iop/reductions.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_iop/rng.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_iop/utils.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_jax/__init__.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_jax/jax_backend.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_numpy/__init__.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_numpy/numpy_backend.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_pytorch/__init__.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_pytorch/pytorch_backend.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_tensorflow/__init__.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_tensorflow/tensorflow_backend.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/types/__init__.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/types/_dtypes.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/decent_array/types/_types.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/Makefile +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/make.bat +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/source/_static/custom.css +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/source/_static/logo.png +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/source/_templates/module.rst.jinja +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/source/_templates/package.rst.jinja +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/source/api/decent_array.array.rst +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/source/api/decent_array.interoperability.rst +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/source/api/decent_array.rst +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/source/api/decent_array.types.rst +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/source/author.rst +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/source/conf.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/source/developer.rst +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/source/index.rst +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/docs/source/user.rst +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/readthedocs.yaml +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/tests/conftest.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/tests/test_backend_manager.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/tests/test_dtypes.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/tests/test_iop_functions.py +0 -0
- {decent_array-0.2.0 → decent_array-0.2.2}/tests/test_iop_rng.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: decent-array
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: A library of array operations and linear algebra primitives for interoperability across ML frameworks.
|
|
5
5
|
Project-URL: Documentation, https://decent-array.readthedocs.io/en/latest/
|
|
6
6
|
Project-URL: Source, https://github.com/team-decent/decent-array
|
|
@@ -383,6 +383,14 @@ class Array:
|
|
|
383
383
|
"""Stringify the wrapped value, not the wrapper."""
|
|
384
384
|
return str(self.value)
|
|
385
385
|
|
|
386
|
+
# Copy -----------------------------------------------------------------
|
|
387
|
+
|
|
388
|
+
def __deepcopy__(self, memo: dict[int, Any]) -> Array:
|
|
389
|
+
"""Deep copy of the array."""
|
|
390
|
+
copied = self._backend.copy(self)
|
|
391
|
+
memo[id(self)] = copied
|
|
392
|
+
return copied
|
|
393
|
+
|
|
386
394
|
# Properties -----------------------------------------------------------
|
|
387
395
|
|
|
388
396
|
@property
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "decent-array"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.2"
|
|
4
4
|
authors = [{name = "Simon Granström"}, {name = "Nicola Bastianello"}]
|
|
5
5
|
maintainers = [{name = "Team Decent"}]
|
|
6
6
|
description = "A library of array operations and linear algebra primitives for interoperability across ML frameworks."
|
|
@@ -40,7 +40,7 @@ jax-gpu = [
|
|
|
40
40
|
]
|
|
41
41
|
|
|
42
42
|
[dependency-groups]
|
|
43
|
-
lint = ["ruff==0.16.
|
|
43
|
+
lint = ["ruff==0.16.5"]
|
|
44
44
|
typecheck = [
|
|
45
45
|
"mypy==2.3.1",
|
|
46
46
|
"types-tensorflow>=2.18,<3",
|
|
@@ -567,3 +567,17 @@ def test_item_n_dim(backend: tuple) -> None:
|
|
|
567
567
|
a = _create_array([1.0, 2.0])
|
|
568
568
|
with pytest.raises(TypeError, match=r"Only 0-dim arrays"):
|
|
569
569
|
_ = a.item()
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
# Copy -------------------------------------------------------------------
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
def test_deepcopy(backend: tuple) -> None:
|
|
576
|
+
from copy import deepcopy
|
|
577
|
+
|
|
578
|
+
src = iop.from_numpy(np.array([1.0, 2.0, 3.0], dtype=np.float32))
|
|
579
|
+
dst = deepcopy(src)
|
|
580
|
+
np.testing.assert_allclose(_np(dst), [1.0, 2.0, 3.0])
|
|
581
|
+
# Mutating the copy shouldn't affect the original.
|
|
582
|
+
dst[0] = 99.0
|
|
583
|
+
np.testing.assert_allclose(_np(src), [1.0, 2.0, 3.0])
|
|
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
|
{decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_abstracts/__init__.py
RENAMED
|
File without changes
|
{decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_abstracts/backend.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_iop/bit_operators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_iop/manipulations.py
RENAMED
|
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
|
{decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_numpy/numpy_backend.py
RENAMED
|
File without changes
|
{decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_pytorch/__init__.py
RENAMED
|
File without changes
|
{decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_pytorch/pytorch_backend.py
RENAMED
|
File without changes
|
{decent_array-0.2.0 → decent_array-0.2.2}/decent_array/interoperability/_tensorflow/__init__.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|