cobra-array 0.1.4__tar.gz → 0.1.5__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.
Files changed (31) hide show
  1. {cobra_array-0.1.4/src/cobra_array.egg-info → cobra_array-0.1.5}/PKG-INFO +1 -1
  2. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/__init__.py +1 -5
  3. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/compat/__init__.py +1 -1
  4. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/compat/_array.pyi +2 -0
  5. {cobra_array-0.1.4 → cobra_array-0.1.5/src/cobra_array.egg-info}/PKG-INFO +1 -1
  6. {cobra_array-0.1.4 → cobra_array-0.1.5}/LICENSE +0 -0
  7. {cobra_array-0.1.4 → cobra_array-0.1.5}/README.md +0 -0
  8. {cobra_array-0.1.4 → cobra_array-0.1.5}/pyproject.toml +0 -0
  9. {cobra_array-0.1.4 → cobra_array-0.1.5}/setup.cfg +0 -0
  10. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/_core.py +0 -0
  11. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/_utils.py +0 -0
  12. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/array_api.py +0 -0
  13. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/compat/_array.py +0 -0
  14. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/compat/_base.py +0 -0
  15. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/compat/_namespace.py +0 -0
  16. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/compat/_namespace.pyi +0 -0
  17. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/convert.py +0 -0
  18. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/convert.pyi +0 -0
  19. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/default.py +0 -0
  20. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/exceptions.py +0 -0
  21. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array/types.py +0 -0
  22. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array.egg-info/SOURCES.txt +0 -0
  23. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array.egg-info/dependency_links.txt +0 -0
  24. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array.egg-info/requires.txt +0 -0
  25. {cobra_array-0.1.4 → cobra_array-0.1.5}/src/cobra_array.egg-info/top_level.txt +0 -0
  26. {cobra_array-0.1.4 → cobra_array-0.1.5}/tests/test_backend.py +0 -0
  27. {cobra_array-0.1.4 → cobra_array-0.1.5}/tests/test_compat.py +0 -0
  28. {cobra_array-0.1.4 → cobra_array-0.1.5}/tests/test_compat_namespace.py +0 -0
  29. {cobra_array-0.1.4 → cobra_array-0.1.5}/tests/test_convert.py +0 -0
  30. {cobra_array-0.1.4 → cobra_array-0.1.5}/tests/test_default.py +0 -0
  31. {cobra_array-0.1.4 → cobra_array-0.1.5}/tests/test_wrap.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cobra-array
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: A backend-agnostic array utility library that unifies array conversion, context control, and cross-library operations across `NumPy`/`PyTorch`-style ecosystems.
5
5
  Author-email: Zhen Tian <zhen.tian.cs@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/tinchen777/cobra-array.git
@@ -32,11 +32,8 @@ Examples
32
32
  from cobra_array.convert import to_numpy, to_tensor, to_list
33
33
 
34
34
  data = [[1, 2], [3, 4]]
35
-
36
35
  arr_np = to_numpy(data, dtype=np.float32) # numpy.ndarray float32
37
-
38
36
  arr_torch = to_tensor(data, device="cpu")
39
-
40
37
  back_to_list = to_list(arr_np) # [[1.0, 2.0], [3.0, 4.0]]
41
38
 
42
39
  - Context-based conversion::
@@ -66,7 +63,6 @@ Examples
66
63
  from cobra_array.default import as_default, default_spec
67
64
 
68
65
  spec = default_spec()
69
-
70
66
  x = as_default([1, 2, 3], unify_dtype=True, unify_device=True)
71
67
  """
72
68
 
@@ -84,7 +80,7 @@ from ._utils import (
84
80
  )
85
81
 
86
82
  __author__ = "Zhen Tian"
87
- __version__ = "0.1.4"
83
+ __version__ = "0.1.5"
88
84
 
89
85
  __all__ = [
90
86
  "array_spec",
@@ -1,6 +1,6 @@
1
1
  # src/cobra_array/compat/__init__.py
2
2
  """
3
- Compatibility utilities for :pkg:`cobra_color`.
3
+ Compatibility utilities for :pkg:`cobra_array`.
4
4
 
5
5
  Functions
6
6
  ---------
@@ -50,6 +50,8 @@ class CompatArray(Compat, Generic[TT, DT]):
50
50
  def __new__(cls, arr: CompatArray[dtypeT, deviceT], /, **kwargs) -> CompatArray[dtypeT, deviceT]: ...
51
51
  @overload
52
52
  def __new__(cls, arr: ArrayLike[dtypeT], /, **kwargs) -> CompatArray[dtypeT, AnyDevice]: ...
53
+ @overload
54
+ def __new__(cls, arr: object, /, **kwargs) -> CompatArray[Any, AnyDevice]: ...
53
55
  def __new__(cls, arr: ArrayLike[Any], /, **kwargs) -> CompatArray[Any, AnyDevice]: ...
54
56
 
55
57
  # === Conversion functions ===
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cobra-array
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: A backend-agnostic array utility library that unifies array conversion, context control, and cross-library operations across `NumPy`/`PyTorch`-style ecosystems.
5
5
  Author-email: Zhen Tian <zhen.tian.cs@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/tinchen777/cobra-array.git
File without changes
File without changes
File without changes
File without changes