Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 598fc29

Browse files
authored
adjust to latest wgpu (#542)
* ndarray.ptp -> np.ptp for numpy v2 * a.request_adapter_infot() -> a.info * update min wgpu and pygfx versions
1 parent 3621471 commit 598fc29

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

docs/source/user_guide/gpu.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ You can get more detailed info on each adapter like this::
5959

6060
import pprint
6161
for a in fpl.enumerate_adapters():
62-
pprint.pprint(a.request_adapter_info())
62+
pprint.pprint(a.info)
6363

6464
General description of the fields:
6565
* vendor: GPU manufacturer
@@ -267,7 +267,7 @@ to ``fpl.select_adapter()``::
267267
# get info or summary of all adapters to pick an adapter
268268
import pprint
269269
for a in fpl.enumerate_adapters():
270-
pprint.pprint(a.request_adapter_info())
270+
pprint.pprint(a.info)
271271

272272
# example, pick adapter at index 2
273273
chosen_gpu = fpl.enumerate_adapters()[2]

examples/tests/testutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def get_wgpu_backend():
3131
"""
3232
Query the configured wgpu backend driver.
3333
"""
34-
code = "import wgpu.utils; info = wgpu.utils.get_default_device().adapter.request_adapter_info(); print(info['adapter_type'], info['backend_type'])"
34+
code = "import wgpu.utils; info = wgpu.utils.get_default_device().adapter.info; print(info['adapter_type'], info['backend_type'])"
3535
result = subprocess.run(
3636
[
3737
sys.executable,

fastplotlib/utils/gui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def _notebook_print_banner():
6060

6161
# print logo and adapter info
6262
adapters = [a for a in wgpu.gpu.enumerate_adapters()]
63-
adapters_info = [a.request_adapter_info() for a in adapters]
63+
adapters_info = [a.info for a in adapters]
6464

65-
default_adapter_info = wgpu.gpu.request_adapter().request_adapter_info()
65+
default_adapter_info = wgpu.gpu.request_adapter().info
6666
default_ix = adapters_info.index(default_adapter_info)
6767

6868
if len(adapters) > 0:

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
install_requires = [
66
"numpy>=1.23.0",
7-
"wgpu<0.16.0",
8-
"pygfx>=0.1.14,<=0.2.0",
7+
"wgpu>=0.16.0",
8+
"pygfx>=0.3.0",
99
]
1010

1111

0 commit comments

Comments
 (0)