pyopencl 2025.2.2__cp313-cp313-win_amd64.whl → 2025.2.4__cp313-cp313-win_amd64.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 pyopencl might be problematic. Click here for more details.

Binary file
pyopencl/array.py CHANGED
@@ -59,6 +59,7 @@ from pyopencl.compyte.array import (
59
59
  equal_strides as _equal_strides,
60
60
  f_contiguous_strides as _f_contiguous_strides,
61
61
  )
62
+ from pyopencl.typing import Allocator
62
63
 
63
64
 
64
65
  if TYPE_CHECKING:
@@ -66,8 +67,6 @@ if TYPE_CHECKING:
66
67
 
67
68
  from numpy.typing import DTypeLike, NDArray
68
69
 
69
- from pyopencl.typing import Allocator
70
-
71
70
 
72
71
  SCALAR_CLASSES = (Number, np.bool_, bool)
73
72
 
@@ -3404,4 +3403,39 @@ def cumsum(a, output_dtype=None, queue: cl.CommandQueue | None = None,
3404
3403
 
3405
3404
  # }}}
3406
3405
 
3406
+
3407
+ __all__ = [
3408
+ "Allocator",
3409
+ "Array",
3410
+ "all",
3411
+ "any",
3412
+ "arange",
3413
+ "as_strided",
3414
+ "concatenate",
3415
+ "cumsum",
3416
+ "diff",
3417
+ "dot",
3418
+ "empty_like",
3419
+ "hstack",
3420
+ "if_positive",
3421
+ "logical_and",
3422
+ "logical_not",
3423
+ "logical_or",
3424
+ "maximum",
3425
+ "minimum",
3426
+ "multi_put",
3427
+ "multi_take",
3428
+ "multi_take_put",
3429
+ "reshape",
3430
+ "stack",
3431
+ "subset_dot",
3432
+ "sum",
3433
+ "take",
3434
+ "to_device",
3435
+ "transpose",
3436
+ "vdot",
3437
+ "zeros",
3438
+ "zeros_like",
3439
+ ]
3440
+
3407
3441
  # vim: foldmethod=marker
@@ -48,8 +48,8 @@ class DTypeRegistry:
48
48
  self.name_to_dtype = {}
49
49
 
50
50
  def get_or_register_dtype(self,
51
- c_names: str | Sequence[str],
52
- dtype: DTypeLike | None = None):
51
+ names: str | Sequence[str],
52
+ dtype: DTypeLike | None = None) -> np.dtype[Any]:
53
53
  """Get or register a :class:`numpy.dtype` associated with the C type names
54
54
  in the string list *c_names*. If *dtype* is `None`, no registration is
55
55
  performed, and the :class:`numpy.dtype` must already have been registered.
@@ -66,12 +66,12 @@ class DTypeRegistry:
66
66
  .. versionadded:: 2012.2
67
67
  """
68
68
 
69
- if isinstance(c_names, str):
70
- c_names = [c_names]
69
+ if isinstance(names, str):
70
+ names = [names]
71
71
 
72
72
  if dtype is None:
73
73
  from pytools import single_valued
74
- return single_valued(self.name_to_dtype[name] for name in c_names)
74
+ return single_valued(self.name_to_dtype[name] for name in names)
75
75
 
76
76
  dtype = np.dtype(dtype)
77
77
 
@@ -86,7 +86,7 @@ class DTypeRegistry:
86
86
  assert existing_dtype == dtype
87
87
  dtype = existing_dtype
88
88
 
89
- for nm in c_names:
89
+ for nm in names:
90
90
  try:
91
91
  name_dtype = self.name_to_dtype[nm]
92
92
  except KeyError:
@@ -97,14 +97,14 @@ class DTypeRegistry:
97
97
  f"name '{nm}' already registered to different dtype")
98
98
 
99
99
  if not existed:
100
- self.dtype_to_name[dtype] = c_names[0]
100
+ self.dtype_to_name[dtype] = names[0]
101
101
  if str(dtype) not in self.dtype_to_name:
102
- self.dtype_to_name[str(dtype)] = c_names[0]
102
+ self.dtype_to_name[str(dtype)] = names[0]
103
103
 
104
104
  return dtype
105
105
 
106
- def dtype_to_ctype(self, dtype: np.dtype[Any]) -> str:
107
- if dtype is None: # pyright: ignore[reportUnnecessaryComparison]
106
+ def dtype_to_ctype(self, dtype: DTypeLike) -> str:
107
+ if dtype is None:
108
108
  raise ValueError("dtype may not be None")
109
109
 
110
110
  dtype = np.dtype(dtype)
@@ -160,12 +160,6 @@ def fill_registry_with_c_types(
160
160
  f"{i64_name} unsigned int"],
161
161
  np.uint64)
162
162
 
163
- # https://github.com/numpy/numpy/issues/2610
164
- if is_64_bit:
165
- reg.get_or_register_dtype([f"unsigned {i64_name}"], np.uintp)
166
- else:
167
- reg.get_or_register_dtype(["unsigned"], np.uintp)
168
-
169
163
  reg.get_or_register_dtype("float", np.float32)
170
164
  reg.get_or_register_dtype("double", np.float64)
171
165
 
@@ -40,6 +40,9 @@ reportUnnecessaryIsInstance = "none"
40
40
  reportUnusedCallResult = "none"
41
41
  reportExplicitAny = "none"
42
42
  reportUnreachable = "hint"
43
+ # array.py looks like stdlib array, but pyright doesn't know this
44
+ # won't ever be a top-level anything.
45
+ reportShadowedImports = "none"
43
46
 
44
47
  # This reports even cycles that are qualified by 'if TYPE_CHECKING'. Not what
45
48
  # we care about at this moment.
pyopencl/typing.py CHANGED
@@ -55,3 +55,7 @@ KernelArg: TypeAlias = """
55
55
  | None"""
56
56
 
57
57
  Allocator: TypeAlias = "Callable[[int], _cl.MemoryObjectHolder | _cl.SVMPointer]"
58
+
59
+
60
+ __all__ = [
61
+ ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyopencl
3
- Version: 2025.2.2
3
+ Version: 2025.2.4
4
4
  Summary: Python wrapper for OpenCL
5
5
  Author-Email: Andreas Kloeckner <inform@tiker.net>
6
6
  License-Expression: MIT
@@ -1,11 +1,11 @@
1
1
  pyopencl/__init__.py,sha256=JAui3XXEV-mVuAeufIOvmvg4TwagUkNsppoJewozayg,65173
2
- pyopencl/_cl.cp313-win_amd64.pyd,sha256=JjtI2vTtPKlAIaXxlKDtnpq54kwyKeOM5bv3ced8Nvk,635904
2
+ pyopencl/_cl.cp313-win_amd64.pyd,sha256=oyM4iOP6BEB4mFUWY3pC_DHsoTszdJBLTBIRufgiwpo,635904
3
3
  pyopencl/_cl.pyi,sha256=QnCqG_fjW3VyUQsxcdcZ8M3ZePQ1BtA4XWFfgjfwGPg,58241
4
4
  pyopencl/_cluda.py,sha256=zlp4ECLzlQOF5ERjXeDJ6j5wYsxPm3VAYwd7adnNYo0,2168
5
5
  pyopencl/_monkeypatch.py,sha256=EyC-4DeFCaSBKQ00kJZxF6z-e44P-XSL6xAN2X0oDXM,35908
6
6
  pyopencl/_mymako.py,sha256=Ki5F6iY5oAdm_R6Mll-ltbO-DZF37FDEINimG2HRyRY,674
7
7
  pyopencl/algorithm.py,sha256=Gx7xqny_g7SA56gbApRdWUvm8UHWJDNvkdL1L3eQ4rY,52824
8
- pyopencl/array.py,sha256=a99NDsxrpzEWfLx8vqUmLF9RY9U3XIgxjAQY5AIjhag,114958
8
+ pyopencl/array.py,sha256=n_JkuAd64pqfIYDjW8Vv6tGWwqCgU2ZqS8NJtFAac6s,115483
9
9
  pyopencl/bitonic_sort.py,sha256=RQUC8tpezdTQGzSEFyue86gVjc76vLKDwaNkqi4afa8,8297
10
10
  pyopencl/bitonic_sort_templates.py,sha256=RQaGOQf7f3f4FPX80h4rxOq3_gAq0e6OKaZIuBjcoUI,16785
11
11
  pyopencl/cache.py,sha256=R_EW9ekoMe9V4Am6MbIgtnMm-BbRQyWZgzfscKEtkB0,16552
@@ -26,12 +26,11 @@ pyopencl/cl/pyopencl-random123/threefry.cl,sha256=bC78-HJVuc4AFiNppglDQiN8cZRD45
26
26
  pyopencl/clmath.py,sha256=XxPDJkWebN3_qTnohXnPuSv8D6dIYQME9R3ObQEUcs4,8540
27
27
  pyopencl/clrandom.py,sha256=ozqtoMU9-68DaLDR6SEpjq0rPZ-UeqQuJU-vlp_y2eA,13493
28
28
  pyopencl/cltypes.py,sha256=gjRNaTQKQvyWI2ObF-BczGqEIAcgu_SzoW1-_22YLCY,6247
29
- pyopencl/compyte/.basedpyright/baseline.json,sha256=kI1X_B_6-Fmx3pFgKTz6befTNSPGQ1-qkOe7l3L6P-M,38914
30
29
  pyopencl/compyte/.gitignore,sha256=PFMRSJycIqPtcpEn7VqbcenWJqHFDuYtwQm_tLbADt8,189
31
30
  pyopencl/compyte/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
31
  pyopencl/compyte/array.py,sha256=uJWC8KBRU29Wzx35VZ-bXRjC-2Qzr8y-4J0UdgldVik,8276
33
- pyopencl/compyte/dtypes.py,sha256=nJ7GJ0F7jEaZbK4AwcbyDpORY2FM9WiixCoIKoi7IV4,11125
34
- pyopencl/compyte/pyproject.toml,sha256=8re-fbz4SCLNmZJFiBIlo5F2OKdjaAdBEH9QYCHjNZE,1194
32
+ pyopencl/compyte/dtypes.py,sha256=oNDNExqCOwjI5P17zuGhxcNSbXzEbSMlgEWMdnSZ6JU,10862
33
+ pyopencl/compyte/pyproject.toml,sha256=iUOcs-BY0oYBQyIjT0knJM95TYcoWF-nB7E_FmuyIaE,1332
35
34
  pyopencl/elementwise.py,sha256=9VOX-sg8vkPne3PGROxuXLSf1FeQ8E8uGKRYvxrRIg4,39852
36
35
  pyopencl/invoker.py,sha256=hMmVaXOgmOjTjCI6Evjx4x_c8FrbBPlClFGCqirAtOE,14123
37
36
  pyopencl/ipython_ext.py,sha256=Hfx5go15On4B0CRDuZcsa3d-lme4-xPNHPdgEa9fbJ8,2021
@@ -39,9 +38,9 @@ pyopencl/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
38
  pyopencl/reduction.py,sha256=QypvaTblYw0oKcNv_Gs-pYz96RvcQa2GouAkVhvft58,27459
40
39
  pyopencl/scan.py,sha256=tmYbMbSx0CfilgZoRzbROX9TbjptPCxHD-WDUx11uTg,67535
41
40
  pyopencl/tools.py,sha256=jLvZAjCBJKwN0Wg_jH9XAObvqIJh-haz_VXpFSfXB1M,48161
42
- pyopencl/typing.py,sha256=JX9tpZPtwyDb2IpM8Ka3YopLpxe1Iidz-Ot7IFprrU8,2027
41
+ pyopencl/typing.py,sha256=d1xGKJTTi1TYa6HKD01N-Zd-QrdbBd4Dr5MPHrpoXmw,2047
43
42
  pyopencl/version.py,sha256=Z5G_fsr_KVWqiYzK_pOQ2PbAO20wrFlEuqqKBGiAv4I,315
44
- pyopencl-2025.2.2.dist-info/METADATA,sha256=PtweID2xOHA7p_vJBtyUejmEOn9Mw0_s1mlTWubMAH8,4756
45
- pyopencl-2025.2.2.dist-info/WHEEL,sha256=9y7ongB9C9SKxcdQbfZEuRQ0kgbFdtXA-x9tA6LgmEA,106
46
- pyopencl-2025.2.2.dist-info/licenses/LICENSE,sha256=jib9h6nV8oAvCkKPKDecpLakmQi1SktCn4YXmllgySY,15566
47
- pyopencl-2025.2.2.dist-info/RECORD,,
43
+ pyopencl-2025.2.4.dist-info/METADATA,sha256=eDa4Y8wB7m8VTYu2x8JpG8sRIiasx7ZPXA-HHsklghM,4756
44
+ pyopencl-2025.2.4.dist-info/WHEEL,sha256=9y7ongB9C9SKxcdQbfZEuRQ0kgbFdtXA-x9tA6LgmEA,106
45
+ pyopencl-2025.2.4.dist-info/licenses/LICENSE,sha256=jib9h6nV8oAvCkKPKDecpLakmQi1SktCn4YXmllgySY,15566
46
+ pyopencl-2025.2.4.dist-info/RECORD,,