xbarray 0.0.1a1__py3-none-any.whl

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.

Potentially problematic release.


This version of xbarray might be problematic. Click here for more details.

Files changed (35) hide show
  1. array_api_typing/__init__.py +9 -0
  2. array_api_typing/typing_2024_12/__init__.py +12 -0
  3. array_api_typing/typing_2024_12/_api_constant.py +32 -0
  4. array_api_typing/typing_2024_12/_api_fft_typing.py +717 -0
  5. array_api_typing/typing_2024_12/_api_linalg_typing.py +897 -0
  6. array_api_typing/typing_2024_12/_api_return_typing.py +103 -0
  7. array_api_typing/typing_2024_12/_api_typing.py +5855 -0
  8. array_api_typing/typing_2024_12/_array_typing.py +1265 -0
  9. array_api_typing/typing_compat/__init__.py +12 -0
  10. array_api_typing/typing_compat/_api_typing.py +27 -0
  11. array_api_typing/typing_compat/_array_typing.py +36 -0
  12. array_api_typing/typing_extra/__init__.py +12 -0
  13. array_api_typing/typing_extra/_api_typing.py +651 -0
  14. array_api_typing/typing_extra/_at.py +87 -0
  15. xbarray/__init__.py +1 -0
  16. xbarray/base/__init__.py +1 -0
  17. xbarray/base/base.py +199 -0
  18. xbarray/common/implementations.py +61 -0
  19. xbarray/jax/__init__.py +25 -0
  20. xbarray/jax/_extra.py +98 -0
  21. xbarray/jax/_typing.py +15 -0
  22. xbarray/jax/random.py +116 -0
  23. xbarray/numpy/__init__.py +19 -0
  24. xbarray/numpy/_extra.py +83 -0
  25. xbarray/numpy/_typing.py +14 -0
  26. xbarray/numpy/random.py +106 -0
  27. xbarray/pytorch/__init__.py +20 -0
  28. xbarray/pytorch/_extra.py +109 -0
  29. xbarray/pytorch/_typing.py +13 -0
  30. xbarray/pytorch/random.py +102 -0
  31. xbarray-0.0.1a1.dist-info/METADATA +14 -0
  32. xbarray-0.0.1a1.dist-info/RECORD +35 -0
  33. xbarray-0.0.1a1.dist-info/WHEEL +5 -0
  34. xbarray-0.0.1a1.dist-info/licenses/LICENSE +21 -0
  35. xbarray-0.0.1a1.dist-info/top_level.txt +2 -0
@@ -0,0 +1,12 @@
1
+ from ._array_typing import Array as ArrayAPIArray, Device as ArrayAPIDevice, DType as ArrayAPIDType, PyCapsule, SupportsDLPack, SetIndex, GetIndex
2
+ from ._api_typing import ArrayAPINamespace
3
+
4
+ __all__ = [
5
+ "ArrayAPIArray",
6
+ "ArrayAPIDevice",
7
+ "ArrayAPIDType",
8
+ "SetIndex",
9
+ "GetIndex",
10
+ "SupportsDLPack",
11
+ "ArrayAPINamespace",
12
+ ]
@@ -0,0 +1,27 @@
1
+ from typing import Protocol, TypeVar, Optional, Any, Tuple, Union, Type
2
+ from typing_extensions import deprecated
3
+ from abc import abstractmethod
4
+ from array_api_typing.typing_2024_12._api_typing import ArrayAPINamespace as ArrayAPI202412Namespace, _NAMESPACE_C, _NAMESPACE_ARRAY, _NAMESPACE_DEVICE, _NAMESPACE_DTYPE
5
+
6
+ class ArrayAPINamespace(ArrayAPI202412Namespace[_NAMESPACE_ARRAY, _NAMESPACE_DEVICE, _NAMESPACE_DTYPE], Protocol[_NAMESPACE_ARRAY, _NAMESPACE_DEVICE, _NAMESPACE_DTYPE]):
7
+ @abstractmethod
8
+ def device(self, x : _NAMESPACE_ARRAY, /) -> _NAMESPACE_DEVICE:
9
+ pass
10
+
11
+ @abstractmethod
12
+ def to_device(
13
+ self,
14
+ x: _NAMESPACE_ARRAY,
15
+ device: _NAMESPACE_DEVICE,
16
+ /,
17
+ *,
18
+ stream : Optional[Union[int, Any]] = None,
19
+ ) -> _NAMESPACE_ARRAY:
20
+ pass
21
+
22
+ @abstractmethod
23
+ def size(
24
+ self,
25
+ x: _NAMESPACE_ARRAY
26
+ ) -> Optional[int]:
27
+ pass
@@ -0,0 +1,36 @@
1
+ from typing import Protocol, TypeVar, Optional, Any, Tuple, Union, Type
2
+ from typing_extensions import deprecated
3
+ from array_api_typing.typing_2024_12._array_typing import SetIndex, GetIndex, Array as ArrayAPI202412Array, Device, DType, PyCapsule, SupportsDLPack
4
+
5
+ __all__ = [
6
+ "SetIndex",
7
+ "GetIndex",
8
+ "Array",
9
+ "PyCapsule",
10
+ "SupportsDLPack",
11
+ "DType",
12
+ "Device",
13
+ ]
14
+
15
+ class Array(ArrayAPI202412Array, Protocol):
16
+ @property
17
+ @deprecated(
18
+ "Some array libraries either do not have the device attribute or include it with an incompatible API. Use array_api_namespace.device() instead.",
19
+ )
20
+ def device(self) -> Device:
21
+ pass
22
+
23
+ @deprecated(
24
+ "some array libraries do not have the `to_device` method. Use array_api_namespace.to_device() instead.",
25
+ )
26
+ def to_device(
27
+ self, device: Device, /, *, stream: Optional[Union[int, Any]] = None
28
+ ):
29
+ pass
30
+
31
+ @property
32
+ @deprecated(
33
+ "PyTorch defines size in an incompatible way. It also fixes dask.arrays behaviour which returns nan for unknown sizes, whereas the standard requires None.",
34
+ )
35
+ def size(self) -> Optional[int]:
36
+ pass
@@ -0,0 +1,12 @@
1
+ from array_api_typing.typing_compat import ArrayAPIArray, ArrayAPIDevice, ArrayAPIDType, SupportsDLPack, SetIndex, GetIndex
2
+ from ._api_typing import ArrayAPINamespace
3
+
4
+ __all__ = [
5
+ "ArrayAPIArray",
6
+ "ArrayAPIDevice",
7
+ "ArrayAPIDType",
8
+ "SetIndex",
9
+ "GetIndex",
10
+ "SupportsDLPack",
11
+ "ArrayAPINamespace"
12
+ ]