pyopencl 2025.2.2__cp310-cp310-musllinux_1_2_x86_64.whl → 2025.2.4__cp310-cp310-musllinux_1_2_x86_64.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.

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
@@ -5,7 +5,7 @@ pyopencl/_cluda.py,sha256=kjI6pW9M-zGCVDsautsKsYMs1U9v73_W5riUjdzmKA0,2111
5
5
  pyopencl/_monkeypatch.py,sha256=bBJjQYW6XdiurbG_jgTzJg5BtDteuNVqRQ3Fuzx-Gbk,34845
6
6
  pyopencl/_mymako.py,sha256=1xp0pWcE57hpIDKw915CvOGQpC-Jral02Inykx_k198,657
7
7
  pyopencl/algorithm.py,sha256=NuBpzVlfY8V6nKcGcQe5uXGnVka7LV1hHCi-uBCAxVc,51370
8
- pyopencl/array.py,sha256=_6HR45dN7bH9uiTDPXqbco8ZDKlddkOIzLMV14j_LWg,111551
8
+ pyopencl/array.py,sha256=kqCowsSiDxdbcpuSYK2bgwbRlBvkSCsOQBfroHVYkiE,112042
9
9
  pyopencl/bitonic_sort.py,sha256=FpTfCf_s22O-SgPWBoXZjCG_k1afm7uUwnO9N7jubgg,8052
10
10
  pyopencl/bitonic_sort_templates.py,sha256=316nsWdr7jpg9g8SmZk8KCoHmHKabjvOdBaufxQPw8Y,16188
11
11
  pyopencl/cache.py,sha256=RiSW4K8FynlV8ibwyDngzSFOa3k-Zi16GSSK05yrdZk,16017
@@ -20,7 +20,7 @@ pyopencl/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  pyopencl/reduction.py,sha256=2Gf91Rw0mUu61SVSqhYWhReV5Ru28Qw60CXmXLhSDO8,26644
21
21
  pyopencl/scan.py,sha256=2OZL2e0q1SPR2N_vXAJKD_Q8m14YE3LSFxeRMC_NrVQ,65619
22
22
  pyopencl/tools.py,sha256=bKX4ND-DcKXr7dCFJoJ6C3SWPNFNKA490oDofTaRuCI,46596
23
- pyopencl/typing.py,sha256=DbU4i2J3fMXRqK49rbsaOpMz7xsaeTMY66iMsc6ZOmo,1970
23
+ pyopencl/typing.py,sha256=LN50UCqujen7SE5cforFvJLoEd3KNEKygxuQiZV4YoQ,1986
24
24
  pyopencl/version.py,sha256=53bqHNFDyobSVMAdQ47kiOx1UdhKXDLkTtzNwfLEvY4,304
25
25
  pyopencl/.libs/libOpenCL-43636d0e.so.1.0.0,sha256=0JfBB18XP3gc7ZYzxCFL3XLbIMDFuQ2MDZsmvMIBFZc,610825
26
26
  pyopencl/characterize/__init__.py,sha256=AaDNS1p2RtXqGf6tA--GB9FRp-fzavbpgulrAW_BE2Y,14565
@@ -39,10 +39,9 @@ pyopencl/cl/pyopencl-random123/threefry.cl,sha256=2WmQGxx5gPSv22UL9_MlXv0eMug91k
39
39
  pyopencl/compyte/.gitignore,sha256=HVYtbKRtOCPWZavrgYqO2u7UKFiE7g7ympmuQzKbBBw,168
40
40
  pyopencl/compyte/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
41
  pyopencl/compyte/array.py,sha256=t1XORyCQ4zRe_KUnoo4LH1W5XOcGXaf5xvGtgOPDzyg,8035
42
- pyopencl/compyte/dtypes.py,sha256=NIv-oOc-DO6YLvX34grMUdefqWVl6QbxztWsGcvnuvA,10803
43
- pyopencl/compyte/pyproject.toml,sha256=yISxFxhotloFnx_Adffvnr0w2samJwGonr64Eq2YDQo,1145
44
- pyopencl/compyte/.basedpyright/baseline.json,sha256=3HQHk-43Nuqf3UVXVCQli6nXbrqnrQvQtsZPjuLR61g,37643
45
- pyopencl-2025.2.2.dist-info/METADATA,sha256=PtweID2xOHA7p_vJBtyUejmEOn9Mw0_s1mlTWubMAH8,4756
46
- pyopencl-2025.2.2.dist-info/WHEEL,sha256=W2E3lADK6fWJapu_S7DjbV25z2o7kBEShIBmPz-KX9s,117
47
- pyopencl-2025.2.2.dist-info/RECORD,,
48
- pyopencl-2025.2.2.dist-info/licenses/LICENSE,sha256=ed06wscfYbymGrF5jRUX9rPCsefHp5ZOv_xgjbXgGrA,5299
42
+ pyopencl/compyte/dtypes.py,sha256=S_cGvFOq07fgwloCq9pxjzlDpxPbwwRb-pb1TOH77nU,10546
43
+ pyopencl/compyte/pyproject.toml,sha256=WmDOFf4Z22yumhUw8tEet-XBtqO36K4eL9nbr4xpzlw,1280
44
+ pyopencl-2025.2.4.dist-info/METADATA,sha256=eDa4Y8wB7m8VTYu2x8JpG8sRIiasx7ZPXA-HHsklghM,4756
45
+ pyopencl-2025.2.4.dist-info/WHEEL,sha256=W2E3lADK6fWJapu_S7DjbV25z2o7kBEShIBmPz-KX9s,117
46
+ pyopencl-2025.2.4.dist-info/RECORD,,
47
+ pyopencl-2025.2.4.dist-info/licenses/LICENSE,sha256=ed06wscfYbymGrF5jRUX9rPCsefHp5ZOv_xgjbXgGrA,5299