pyopencl 2025.2.2__tar.gz → 2025.2.4__tar.gz

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.

Files changed (127) hide show
  1. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/PKG-INFO +1 -1
  2. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/runtime.rst +3 -3
  3. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/array.py +36 -2
  4. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/compyte/dtypes.py +10 -16
  5. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/compyte/pyproject.toml +3 -0
  6. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/typing.py +4 -0
  7. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyproject.toml +2 -1
  8. pyopencl-2025.2.2/.basedpyright/baseline.json +0 -48956
  9. pyopencl-2025.2.2/pyopencl/compyte/.basedpyright/baseline.json +0 -1272
  10. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/.gitignore +0 -0
  11. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/.gitlab-ci.yml +0 -0
  12. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/.gitmodules +0 -0
  13. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/.test-conda-env-py3.yml +0 -0
  14. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/CITATION.cff +0 -0
  15. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/CMakeLists.txt +0 -0
  16. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/LICENSE +0 -0
  17. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/README.rst +0 -0
  18. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/contrib/cldis.py +0 -0
  19. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/contrib/fortran-to-opencl/README +0 -0
  20. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/contrib/fortran-to-opencl/translate.py +0 -0
  21. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/contrib/pyopencl.vim +0 -0
  22. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/.gitignore +0 -0
  23. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/Makefile +0 -0
  24. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/algorithm.rst +0 -0
  25. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/array.rst +0 -0
  26. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/conf.py +0 -0
  27. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/howto.rst +0 -0
  28. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/index.rst +0 -0
  29. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/make_constants.py +0 -0
  30. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/misc.rst +0 -0
  31. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/runtime_const.rst +0 -0
  32. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/runtime_gl.rst +0 -0
  33. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/runtime_memory.rst +0 -0
  34. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/runtime_platform.rst +0 -0
  35. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/runtime_program.rst +0 -0
  36. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/runtime_queue.rst +0 -0
  37. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/subst.rst +0 -0
  38. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/tools.rst +0 -0
  39. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/doc/types.rst +0 -0
  40. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/.gitignore +0 -0
  41. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/black-hole-accretion.py +0 -0
  42. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo-struct-reduce.py +0 -0
  43. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo.py +0 -0
  44. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo_array.py +0 -0
  45. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo_array_svm.py +0 -0
  46. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo_elementwise.py +0 -0
  47. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo_elementwise_complex.py +0 -0
  48. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo_mandelbrot.py +0 -0
  49. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo_meta_codepy.py +0 -0
  50. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/demo_meta_template.py +0 -0
  51. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/dump-performance.py +0 -0
  52. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/dump-properties.py +0 -0
  53. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/gl_interop_demo.py +0 -0
  54. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/gl_particle_animation.py +0 -0
  55. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/image_filters_using_image2d_t.py +0 -0
  56. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/ipython-demo.ipynb +0 -0
  57. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/median-filter.py +0 -0
  58. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/n-body.py +0 -0
  59. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/narray.py +0 -0
  60. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/noisyImage.jpg +0 -0
  61. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/pi-monte-carlo.py +0 -0
  62. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/svm.py +0 -0
  63. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/examples/transpose.py +0 -0
  64. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/__init__.py +0 -0
  65. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/_cl.pyi +0 -0
  66. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/_cluda.py +0 -0
  67. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/_monkeypatch.py +0 -0
  68. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/_mymako.py +0 -0
  69. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/algorithm.py +0 -0
  70. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/bitonic_sort.py +0 -0
  71. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/bitonic_sort_templates.py +0 -0
  72. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cache.py +0 -0
  73. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/capture_call.py +0 -0
  74. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/characterize/__init__.py +0 -0
  75. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/characterize/performance.py +0 -0
  76. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-airy.cl +0 -0
  77. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-bessel-j-complex.cl +0 -0
  78. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-bessel-j.cl +0 -0
  79. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-bessel-y.cl +0 -0
  80. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-complex.h +0 -0
  81. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-eval-tbl.cl +0 -0
  82. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-hankel-complex.cl +0 -0
  83. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-random123/array.h +0 -0
  84. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-random123/openclfeatures.h +0 -0
  85. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-random123/philox.cl +0 -0
  86. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cl/pyopencl-random123/threefry.cl +0 -0
  87. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/clmath.py +0 -0
  88. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/clrandom.py +0 -0
  89. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/cltypes.py +0 -0
  90. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/compyte/.gitignore +0 -0
  91. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/compyte/__init__.py +0 -0
  92. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/compyte/array.py +0 -0
  93. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/elementwise.py +0 -0
  94. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/invoker.py +0 -0
  95. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/ipython_ext.py +0 -0
  96. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/py.typed +0 -0
  97. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/reduction.py +0 -0
  98. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/scan.py +0 -0
  99. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/tools.py +0 -0
  100. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/pyopencl/version.py +0 -0
  101. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/scripts/build-ocl-macos.sh +0 -0
  102. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/scripts/build-ocl-windows.sh +0 -0
  103. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/scripts/build-ocl.sh +0 -0
  104. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/bitlog.cpp +0 -0
  105. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/bitlog.hpp +0 -0
  106. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/clinfo_ext.h +0 -0
  107. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/mempool.hpp +0 -0
  108. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/pyopencl_ext.h +0 -0
  109. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/tools.hpp +0 -0
  110. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/wrap_cl.cpp +0 -0
  111. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/wrap_cl.hpp +0 -0
  112. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/wrap_cl_part_1.cpp +0 -0
  113. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/wrap_cl_part_2.cpp +0 -0
  114. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/wrap_constants.cpp +0 -0
  115. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/wrap_helpers.hpp +0 -0
  116. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/src/wrap_mempool.cpp +0 -0
  117. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/stubgen/stubgen.py +0 -0
  118. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/add-vectors-32.spv +0 -0
  119. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/add-vectors-64.spv +0 -0
  120. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/empty-header.h +0 -0
  121. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/test_algorithm.py +0 -0
  122. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/test_array.py +0 -0
  123. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/test_arrays_in_structs.py +0 -0
  124. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/test_clmath.py +0 -0
  125. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/test_clrandom.py +0 -0
  126. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/test_enqueue_copy.py +0 -0
  127. {pyopencl-2025.2.2 → pyopencl-2025.2.4}/test/test_wrapper.py +0 -0
@@ -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
@@ -57,7 +57,7 @@ resolve them.
57
57
 
58
58
  .. class:: WaitList
59
59
 
60
- A :class:`Sequence` of :class:`Event`\ s, or None.
60
+ A :class:`Sequence` of :class:`Event`\ s or *None*.
61
61
 
62
62
  .. class:: NDArray
63
63
 
@@ -95,11 +95,11 @@ resolve them.
95
95
 
96
96
  .. class:: WaitList
97
97
 
98
- A :class:`Sequence` of :class:`Event`\ s, or None.
98
+ A :class:`Sequence` of :class:`Event`\ s or *None*.
99
99
 
100
100
  .. class:: Context
101
101
 
102
- See :class:`pyopencl.CommandQueue`.
102
+ See :class:`pyopencl.Context`.
103
103
 
104
104
  .. class:: CommandQueue
105
105
 
@@ -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.
@@ -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
+ ]
@@ -11,7 +11,7 @@ requires = [
11
11
 
12
12
  [project]
13
13
  name = "pyopencl"
14
- version = "2025.2.2"
14
+ version = "2025.2.4"
15
15
  description = "Python wrapper for OpenCL"
16
16
  readme = "README.rst"
17
17
  license = "MIT"
@@ -65,6 +65,7 @@ Repository = "https://github.com/inducer/pyopencl"
65
65
 
66
66
  [tool.scikit-build]
67
67
  sdist.exclude = [
68
+ ".basedpyright",
68
69
  ".mypy_cache",
69
70
  ".ci",
70
71
  ".github",