From 57702ac398e61f58a86f4cfd2965ed48a7f9ab95 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Mon, 17 Jun 2024 20:48:38 -0400 Subject: [PATCH 1/3] ndarray.ptp -> np.ptp for numpy v2 --- fastplotlib/widgets/histogram_lut.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastplotlib/widgets/histogram_lut.py b/fastplotlib/widgets/histogram_lut.py index a3edffcbd..02c21aa38 100644 --- a/fastplotlib/widgets/histogram_lut.py +++ b/fastplotlib/widgets/histogram_lut.py @@ -163,7 +163,7 @@ def _calculate_histogram(self, data): # used if data ptp <= 10 because event things get weird # with tiny world objects due to floating point error # so if ptp <= 10, scale up by a factor - self._scale_factor: int = max(1, 100 * int(10 / data_ss.ptp())) + self._scale_factor: int = max(1, 100 * int(10 / np.ptp(data_ss))) edges = edges * self._scale_factor From 6de54c4d362c7a7153afcb7f9c42e41f38fc2db3 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Wed, 26 Jun 2024 18:44:08 +0200 Subject: [PATCH 2/3] a.request_adapter_infot() -> a.info --- docs/source/user_guide/gpu.rst | 4 ++-- examples/tests/testutils.py | 2 +- fastplotlib/utils/gui.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/user_guide/gpu.rst b/docs/source/user_guide/gpu.rst index 1bbc0c030..f4ef89a0c 100644 --- a/docs/source/user_guide/gpu.rst +++ b/docs/source/user_guide/gpu.rst @@ -59,7 +59,7 @@ You can get more detailed info on each adapter like this:: import pprint for a in fpl.enumerate_adapters(): - pprint.pprint(a.request_adapter_info()) + pprint.pprint(a.info) General description of the fields: * vendor: GPU manufacturer @@ -267,7 +267,7 @@ to ``fpl.select_adapter()``:: # get info or summary of all adapters to pick an adapter import pprint for a in fpl.enumerate_adapters(): - pprint.pprint(a.request_adapter_info()) + pprint.pprint(a.info) # example, pick adapter at index 2 chosen_gpu = fpl.enumerate_adapters()[2] diff --git a/examples/tests/testutils.py b/examples/tests/testutils.py index 22747ce08..0e4cd2e1b 100644 --- a/examples/tests/testutils.py +++ b/examples/tests/testutils.py @@ -31,7 +31,7 @@ def get_wgpu_backend(): """ Query the configured wgpu backend driver. """ - code = "import wgpu.utils; info = wgpu.utils.get_default_device().adapter.request_adapter_info(); print(info['adapter_type'], info['backend_type'])" + code = "import wgpu.utils; info = wgpu.utils.get_default_device().adapter.info; print(info['adapter_type'], info['backend_type'])" result = subprocess.run( [ sys.executable, diff --git a/fastplotlib/utils/gui.py b/fastplotlib/utils/gui.py index 1941674ee..1f13c1406 100644 --- a/fastplotlib/utils/gui.py +++ b/fastplotlib/utils/gui.py @@ -60,9 +60,9 @@ def _notebook_print_banner(): # print logo and adapter info adapters = [a for a in wgpu.gpu.enumerate_adapters()] - adapters_info = [a.request_adapter_info() for a in adapters] + adapters_info = [a.info for a in adapters] - default_adapter_info = wgpu.gpu.request_adapter().request_adapter_info() + default_adapter_info = wgpu.gpu.request_adapter().info default_ix = adapters_info.index(default_adapter_info) if len(adapters) > 0: From ae7bbb7e2dab7efa0144c4b093feb05780f9eb52 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Wed, 26 Jun 2024 18:54:55 +0200 Subject: [PATCH 3/3] update min wgpu and pygfx versions --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 7229dcf25..56900c1fa 100644 --- a/setup.py +++ b/setup.py @@ -4,8 +4,8 @@ install_requires = [ "numpy>=1.23.0", - "wgpu<0.16.0", - "pygfx>=0.1.14,<=0.2.0", + "wgpu>=0.16.0", + "pygfx>=0.3.0", ] pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy