xbarray 0.0.1a6__py3-none-any.whl → 0.0.1a8__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.
- array_api_typing/typing_2024_12/_api_return_typing.py +2 -2
- xbarray/_src/implementations/jax/__init__.py +2 -0
- xbarray/_src/implementations/jax/random.py +1 -1
- xbarray/_src/implementations/numpy/__init__.py +1 -0
- xbarray/_src/implementations/pytorch/__init__.py +1 -0
- xbarray/jax.py +4 -1
- xbarray/numpy.py +4 -1
- xbarray/pytorch.py +4 -1
- {xbarray-0.0.1a6.dist-info → xbarray-0.0.1a8.dist-info}/METADATA +1 -1
- {xbarray-0.0.1a6.dist-info → xbarray-0.0.1a8.dist-info}/RECORD +13 -13
- {xbarray-0.0.1a6.dist-info → xbarray-0.0.1a8.dist-info}/WHEEL +0 -0
- {xbarray-0.0.1a6.dist-info → xbarray-0.0.1a8.dist-info}/licenses/LICENSE +0 -0
- {xbarray-0.0.1a6.dist-info → xbarray-0.0.1a8.dist-info}/top_level.txt +0 -0
|
@@ -98,6 +98,6 @@ class Info(Protocol):
|
|
|
98
98
|
...
|
|
99
99
|
|
|
100
100
|
def dtypes(
|
|
101
|
-
self, *, device: Optional[Device], kind: Optional[Union[str, Tuple[str, ...]]]
|
|
102
|
-
) -> DataTypes:
|
|
101
|
+
self, *, device: Optional[Device] = None, kind: Optional[Union[str, Tuple[str, ...]]] = None
|
|
102
|
+
) -> DataTypes: # In the original signature there's no default parameters for `device` and `kind`, but we add them since they exist in `array_api_compat` modules
|
|
103
103
|
...
|
|
@@ -3,9 +3,11 @@ import jax.numpy
|
|
|
3
3
|
if hasattr(jax.numpy, "__array_api_version__"):
|
|
4
4
|
compat_module = jax.numpy
|
|
5
5
|
from jax.numpy import *
|
|
6
|
+
from jax.numpy import __array_api_version__, __array_namespace_info__
|
|
6
7
|
else:
|
|
7
8
|
import jax.experimental.array_api as compat_module
|
|
8
9
|
from jax.experimental.array_api import *
|
|
10
|
+
from jax.experimental.array_api import __array_api_version__, __array_namespace_info__
|
|
9
11
|
|
|
10
12
|
from array_api_compat.common._helpers import *
|
|
11
13
|
|
|
@@ -18,7 +18,7 @@ def random_number_generator(
|
|
|
18
18
|
*,
|
|
19
19
|
device : Optional[DEVICE_TYPE] = None
|
|
20
20
|
) -> RNG_TYPE:
|
|
21
|
-
rng_seed = np.random.randint(
|
|
21
|
+
rng_seed = np.random.randint(65535) if seed is None else seed
|
|
22
22
|
rng = jax.random.key(
|
|
23
23
|
seed=rng_seed
|
|
24
24
|
)
|
xbarray/jax.py
CHANGED
|
@@ -8,7 +8,10 @@ class JaxComputeBackend(metaclass=ComputeBackendImplCls):
|
|
|
8
8
|
RNG_TYPE = jax_impl.RNG_TYPE
|
|
9
9
|
|
|
10
10
|
for name in dir(jax_impl):
|
|
11
|
-
if not name.startswith('_')
|
|
11
|
+
if not name.startswith('_') or name in [
|
|
12
|
+
'__array_namespace_info__',
|
|
13
|
+
'__array_api_version__',
|
|
14
|
+
]:
|
|
12
15
|
setattr(JaxComputeBackend, name, getattr(jax_impl, name))
|
|
13
16
|
|
|
14
17
|
__all__ = [
|
xbarray/numpy.py
CHANGED
|
@@ -8,7 +8,10 @@ class NumpyComputeBackend(metaclass=ComputeBackendImplCls):
|
|
|
8
8
|
RNG_TYPE = numpy_impl.RNG_TYPE
|
|
9
9
|
|
|
10
10
|
for name in dir(numpy_impl):
|
|
11
|
-
if not name.startswith('_')
|
|
11
|
+
if not name.startswith('_') or name in [
|
|
12
|
+
'__array_namespace_info__',
|
|
13
|
+
'__array_api_version__',
|
|
14
|
+
]:
|
|
12
15
|
setattr(NumpyComputeBackend, name, getattr(numpy_impl, name))
|
|
13
16
|
|
|
14
17
|
__all__ = [
|
xbarray/pytorch.py
CHANGED
|
@@ -8,7 +8,10 @@ class PytorchComputeBackend(metaclass=ComputeBackendImplCls):
|
|
|
8
8
|
RNG_TYPE = pytorch_impl.RNG_TYPE
|
|
9
9
|
|
|
10
10
|
for name in dir(pytorch_impl):
|
|
11
|
-
if not name.startswith('_')
|
|
11
|
+
if not name.startswith('_') or name in [
|
|
12
|
+
'__array_namespace_info__',
|
|
13
|
+
'__array_api_version__',
|
|
14
|
+
]:
|
|
12
15
|
setattr(PytorchComputeBackend, name, getattr(pytorch_impl, name))
|
|
13
16
|
|
|
14
17
|
__all__ = [
|
|
@@ -3,7 +3,7 @@ array_api_typing/typing_2024_12/__init__.py,sha256=JuD2yojHl3eQI74U75tFhSX5rSy32
|
|
|
3
3
|
array_api_typing/typing_2024_12/_api_constant.py,sha256=tahdzdi7vAZ3UnM8oDcUqvx2FFsMTAyUbuwgarU6K9U,676
|
|
4
4
|
array_api_typing/typing_2024_12/_api_fft_typing.py,sha256=i48S-9trw3s72xiCJmeCNGlJLwwOVq0kJC4lD9se_co,38641
|
|
5
5
|
array_api_typing/typing_2024_12/_api_linalg_typing.py,sha256=Dt5fDTwYb-GAmP7duajwPqH3zaJmwvxDEOOzdl5X0LE,48950
|
|
6
|
-
array_api_typing/typing_2024_12/_api_return_typing.py,sha256=
|
|
6
|
+
array_api_typing/typing_2024_12/_api_return_typing.py,sha256=rIygF4PAr7G1PK3cVOwQNrev_kGCuMcfIJ9i8L0u1tI,2462
|
|
7
7
|
array_api_typing/typing_2024_12/_api_typing.py,sha256=rFuF7E6b2RrijzQBrZx6_dYEn9Yslq8FqI31L1Ccrf4,294255
|
|
8
8
|
array_api_typing/typing_2024_12/_array_typing.py,sha256=GMqs5LgshujRIh7i0mGtZy4Vt56FSXqBmNlBGidFRnc,57403
|
|
9
9
|
array_api_typing/typing_compat/__init__.py,sha256=JuD2yojHl3eQI74U75tFhSX5rSy32TR5nKyi714ZfX4,347
|
|
@@ -13,19 +13,19 @@ array_api_typing/typing_extra/__init__.py,sha256=YfdhD-Sfk3SCfI9lHmA-PbVLzms1OFF
|
|
|
13
13
|
array_api_typing/typing_extra/_api_typing.py,sha256=Jj_E61r35EgecWmBvAzpASV4qub5aQI_O4aL-ngEvQ8,23028
|
|
14
14
|
array_api_typing/typing_extra/_at.py,sha256=S7_YjOwR3a8olZWgwpLDFEfnekRufRqrtfiMLwrWjgo,2202
|
|
15
15
|
xbarray/__init__.py,sha256=k4Ipp7IoODqHWZ-eeBhcU7Ch8FudF8rag6KbeIurrgY,45
|
|
16
|
-
xbarray/jax.py,sha256=
|
|
17
|
-
xbarray/numpy.py,sha256
|
|
18
|
-
xbarray/pytorch.py,sha256=
|
|
16
|
+
xbarray/jax.py,sha256=nEdufdTHGXsQSYBbCUwgLikR7saAoZ0zL1a4vrs4I2w,569
|
|
17
|
+
xbarray/numpy.py,sha256=1EaT-RVrJEsrgXE-JmbrKfH6nTVLi9sjQ3D81rWhd4Y,591
|
|
18
|
+
xbarray/pytorch.py,sha256=4j1UOD6wC29zIAFOR6s0tV2vY2bqKCiiJfua_k_jHKs,613
|
|
19
19
|
xbarray/_src/implementations/_common/implementations.py,sha256=ba6fyoHMrawrrjTULSqt073-aMw7abqFWh5YnzeOHMU,2688
|
|
20
|
-
xbarray/_src/implementations/jax/__init__.py,sha256=
|
|
20
|
+
xbarray/_src/implementations/jax/__init__.py,sha256=vOtCkwe98vNI1qQOu0Xv9OIaVucaJp6bEI9_mzicBH0,1014
|
|
21
21
|
xbarray/_src/implementations/jax/_extra.py,sha256=QmPL7Syp-6y2NUbMYsTlI8uER0Gh5xjBbrNeyTIGZsc,2515
|
|
22
22
|
xbarray/_src/implementations/jax/_typing.py,sha256=U9BUxHNEjFB0LHF1KMrFLbh6E5kVvpAF8bZUbLNf25E,278
|
|
23
|
-
xbarray/_src/implementations/jax/random.py,sha256=
|
|
24
|
-
xbarray/_src/implementations/numpy/__init__.py,sha256=
|
|
23
|
+
xbarray/_src/implementations/jax/random.py,sha256=bIyGV0Nc1PF4PaU0F-paOG4bAENm8ngJFr20voMaYsg,3316
|
|
24
|
+
xbarray/_src/implementations/numpy/__init__.py,sha256=hJEcFR86pb1G72MFS1X15qwI_-BuPxy5SS5PXB0alQI,792
|
|
25
25
|
xbarray/_src/implementations/numpy/_extra.py,sha256=JJs0_HNsnEkBPlXsomRjX5Jh254iXuw_o_3ZXK5c83s,1993
|
|
26
26
|
xbarray/_src/implementations/numpy/_typing.py,sha256=pgjLLAipwFsIk0QdgrAA4PEvjF_ugHbzfSTbLpA__6o,241
|
|
27
27
|
xbarray/_src/implementations/numpy/random.py,sha256=C1z2-pMcDMRa7nKhKNTuY5LtTlu9nXvDpH1wY8mdIug,2630
|
|
28
|
-
xbarray/_src/implementations/pytorch/__init__.py,sha256=
|
|
28
|
+
xbarray/_src/implementations/pytorch/__init__.py,sha256=s2mF3jWI356oedPZevKYARCFhlXH0hqS9OgBzxMSgHQ,795
|
|
29
29
|
xbarray/_src/implementations/pytorch/_extra.py,sha256=HwytMuHZ0iyYKmYCj6QaTUKukMRWb47pme6xJ07LLjY,2878
|
|
30
30
|
xbarray/_src/implementations/pytorch/_typing.py,sha256=qSnNZD3IpgSoOTl3TBRBv2ifSAHOw0aR9uyzfV5KYVw,204
|
|
31
31
|
xbarray/_src/implementations/pytorch/random.py,sha256=p4ZDsTc--z5XslVzel-iEVDtoKizrv39_1tfR4-469o,2657
|
|
@@ -34,8 +34,8 @@ xbarray/_src/serialization/serialization_map.py,sha256=05zfqip8qPCt-LgM_cx_zLc4y
|
|
|
34
34
|
xbarray/base/__init__.py,sha256=ERmmOxz_9mUkIuccNbzUa5Y6gVLLVDdyc4cCxbCCUbY,20
|
|
35
35
|
xbarray/base/base.py,sha256=V1yAXu2wUu6q50okX7JQ8onkGhHIQ0lkPkYOolwc45A,5928
|
|
36
36
|
xbarray/cls_impl/cls_base.py,sha256=MUvJeMm4UVW4jXwfVP02GiCzqftrAND-JYvThge4PUw,312
|
|
37
|
-
xbarray-0.0.
|
|
38
|
-
xbarray-0.0.
|
|
39
|
-
xbarray-0.0.
|
|
40
|
-
xbarray-0.0.
|
|
41
|
-
xbarray-0.0.
|
|
37
|
+
xbarray-0.0.1a8.dist-info/licenses/LICENSE,sha256=6P0HCOancSfch0dNycuDIe8_qwS0Id97Ih_8hjJ2PFI,1067
|
|
38
|
+
xbarray-0.0.1a8.dist-info/METADATA,sha256=pUZo5IP6WNuu_8gI67InORiPHfH1bclRHuEeNYHHdCs,436
|
|
39
|
+
xbarray-0.0.1a8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
40
|
+
xbarray-0.0.1a8.dist-info/top_level.txt,sha256=VriXuFyU48Du4HQMzROSArhwqB6EZYY0n0mipgUqB9A,25
|
|
41
|
+
xbarray-0.0.1a8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|