xbarray 0.0.1a4__py3-none-any.whl → 0.0.1a6__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.

@@ -18,7 +18,7 @@ for api_name in dir(array_api_extra):
18
18
  if api_name.startswith('_'):
19
19
  continue
20
20
 
21
- if api_name == 'at':
21
+ if api_name in ['at', 'broadcast_shapes']:
22
22
  globals()[api_name] = getattr(array_api_extra, api_name)
23
23
  else:
24
24
  globals()[api_name] = partial(
@@ -57,7 +57,6 @@ def to_numpy(
57
57
  return np.asarray(data)
58
58
 
59
59
  def to_dlpack(
60
- self,
61
60
  data: ARRAY_TYPE,
62
61
  /,
63
62
  ) -> SupportsDLPack:
@@ -11,7 +11,7 @@ for api_name in dir(array_api_extra):
11
11
  if api_name.startswith('_'):
12
12
  continue
13
13
 
14
- if api_name == 'at':
14
+ if api_name in ['at', 'broadcast_shapes']:
15
15
  globals()[api_name] = getattr(array_api_extra, api_name)
16
16
  else:
17
17
  globals()[api_name] = partial(
@@ -48,7 +48,6 @@ def to_numpy(
48
48
  return data
49
49
 
50
50
  def to_dlpack(
51
- self,
52
51
  data: ARRAY_TYPE,
53
52
  /,
54
53
  ) -> SupportsDLPack:
@@ -12,7 +12,7 @@ for api_name in dir(array_api_extra):
12
12
  if api_name.startswith('_'):
13
13
  continue
14
14
 
15
- if api_name == 'at':
15
+ if api_name in ['at', 'broadcast_shapes']:
16
16
  globals()[api_name] = getattr(array_api_extra, api_name)
17
17
  else:
18
18
  globals()[api_name] = partial(
@@ -65,7 +65,6 @@ def to_numpy(
65
65
  return data.cpu().numpy()
66
66
 
67
67
  def to_dlpack(
68
- self,
69
68
  data: ARRAY_TYPE,
70
69
  /,
71
70
  ) -> SupportsDLPack:
xbarray/jax.py CHANGED
@@ -2,7 +2,10 @@ from xbarray.cls_impl.cls_base import ComputeBackendImplCls
2
2
  from ._src.implementations import jax as jax_impl
3
3
 
4
4
  class JaxComputeBackend(metaclass=ComputeBackendImplCls):
5
- pass
5
+ ARRAY_TYPE = jax_impl.ARRAY_TYPE
6
+ DTYPE_TYPE = jax_impl.DTYPE_TYPE
7
+ DEVICE_TYPE = jax_impl.DEVICE_TYPE
8
+ RNG_TYPE = jax_impl.RNG_TYPE
6
9
 
7
10
  for name in dir(jax_impl):
8
11
  if not name.startswith('_'):
xbarray/numpy.py CHANGED
@@ -2,7 +2,10 @@ from xbarray.cls_impl.cls_base import ComputeBackendImplCls
2
2
  from ._src.implementations import numpy as numpy_impl
3
3
 
4
4
  class NumpyComputeBackend(metaclass=ComputeBackendImplCls):
5
- pass
5
+ ARRAY_TYPE = numpy_impl.ARRAY_TYPE
6
+ DTYPE_TYPE = numpy_impl.DTYPE_TYPE
7
+ DEVICE_TYPE = numpy_impl.DEVICE_TYPE
8
+ RNG_TYPE = numpy_impl.RNG_TYPE
6
9
 
7
10
  for name in dir(numpy_impl):
8
11
  if not name.startswith('_'):
xbarray/pytorch.py CHANGED
@@ -2,7 +2,10 @@ from xbarray.cls_impl.cls_base import ComputeBackendImplCls
2
2
  from ._src.implementations import pytorch as pytorch_impl
3
3
 
4
4
  class PytorchComputeBackend(metaclass=ComputeBackendImplCls):
5
- pass
5
+ ARRAY_TYPE = pytorch_impl.ARRAY_TYPE
6
+ DTYPE_TYPE = pytorch_impl.DTYPE_TYPE
7
+ DEVICE_TYPE = pytorch_impl.DEVICE_TYPE
8
+ RNG_TYPE = pytorch_impl.RNG_TYPE
6
9
 
7
10
  for name in dir(pytorch_impl):
8
11
  if not name.startswith('_'):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xbarray
3
- Version: 0.0.1a4
3
+ Version: 0.0.1a6
4
4
  Summary: Cross-backend Python array library based on the Array API Standard.
5
5
  Requires-Python: >=3.10
6
6
  License-File: LICENSE
@@ -13,20 +13,20 @@ 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=3DHAFsWvfurCI0H6loqx4LtmBov9KbIxeHGmwLKrdh4,344
17
- xbarray/numpy.py,sha256=8thyuJZlm0MJXGx6YWlgxV9ASG-In9jn-pwUFFk7iB4,358
18
- xbarray/pytorch.py,sha256=NEKlF_QoiOQl0T-aP_CkUxJ3HgFJEm0hmLy9v5I7qAo,372
16
+ xbarray/jax.py,sha256=9iWvuv46YJ5NBTAEd8fm9ycLfP3vsCXiXZMH0i-FQN0,481
17
+ xbarray/numpy.py,sha256=-b95zhrPZu65OqQEfpv3KtXNRm9WRhp6VWQ793nn_Tc,503
18
+ xbarray/pytorch.py,sha256=5SUKsk1TBVmOKEHawsWRzO1X2yHoaczKecj1yWeWz38,525
19
19
  xbarray/_src/implementations/_common/implementations.py,sha256=ba6fyoHMrawrrjTULSqt073-aMw7abqFWh5YnzeOHMU,2688
20
- xbarray/_src/implementations/jax/__init__.py,sha256=fZMtXujTLhfHofWJzeMtsOuNhUYSZzCEj06RulT4RqQ,827
21
- xbarray/_src/implementations/jax/_extra.py,sha256=2akggZTP2xIXe5AdVs4rNk8yCJOpTJX8rlv94SY4HJA,2525
20
+ xbarray/_src/implementations/jax/__init__.py,sha256=txNdaIdGbsjvyNiYQCVSXOPUUFbFlmPxeXqI537ZZf4,849
21
+ xbarray/_src/implementations/jax/_extra.py,sha256=QmPL7Syp-6y2NUbMYsTlI8uER0Gh5xjBbrNeyTIGZsc,2515
22
22
  xbarray/_src/implementations/jax/_typing.py,sha256=U9BUxHNEjFB0LHF1KMrFLbh6E5kVvpAF8bZUbLNf25E,278
23
23
  xbarray/_src/implementations/jax/random.py,sha256=k6vuNLTOSUClMKI6My0-Xekkeu6hJrUyNib1TziuGag,3312
24
- xbarray/_src/implementations/numpy/__init__.py,sha256=UcUDdf7xDp_oLw5O73G_n15qYzPd5XQsq4cnZoaX9y0,687
25
- xbarray/_src/implementations/numpy/_extra.py,sha256=p7WkiCWEl14A4W6lwo2TthKalsuAe7DuRhtQxJWf7ng,2003
24
+ xbarray/_src/implementations/numpy/__init__.py,sha256=43RevxVhfmGC2DJFqOQZbM5Ltt9dFmOwTRR-U964SOU,709
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=ZCGmZpbv4NaCWU_08G-ipEpI1xMr7QLXzEhwrhD7fI8,690
29
- xbarray/_src/implementations/pytorch/_extra.py,sha256=XBYZEYcia3JT7Uk2PT-DyiC-_9J_Rjtg3vQB04spXc8,2888
28
+ xbarray/_src/implementations/pytorch/__init__.py,sha256=VbPrqm_ExumVvqq_BcjGLt17cGVkZ4DHUvt8_ilKQIk,712
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
32
32
  xbarray/_src/serialization/__init__.py,sha256=xnfYis9UhhvrCGtzzo7dRLb22MEpaNPAJrpljjP1YUU,32
@@ -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.1a4.dist-info/licenses/LICENSE,sha256=6P0HCOancSfch0dNycuDIe8_qwS0Id97Ih_8hjJ2PFI,1067
38
- xbarray-0.0.1a4.dist-info/METADATA,sha256=Ij9lDaD2N4y8zUe5wU_QrXxtAJpDS1zmZmhU8RUli2I,436
39
- xbarray-0.0.1a4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
- xbarray-0.0.1a4.dist-info/top_level.txt,sha256=VriXuFyU48Du4HQMzROSArhwqB6EZYY0n0mipgUqB9A,25
41
- xbarray-0.0.1a4.dist-info/RECORD,,
37
+ xbarray-0.0.1a6.dist-info/licenses/LICENSE,sha256=6P0HCOancSfch0dNycuDIe8_qwS0Id97Ih_8hjJ2PFI,1067
38
+ xbarray-0.0.1a6.dist-info/METADATA,sha256=225pH9H1HoPK37OAA07p87Cahfq4eKTqz5M70iv2xAI,436
39
+ xbarray-0.0.1a6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
+ xbarray-0.0.1a6.dist-info/top_level.txt,sha256=VriXuFyU48Du4HQMzROSArhwqB6EZYY0n0mipgUqB9A,25
41
+ xbarray-0.0.1a6.dist-info/RECORD,,