From 57702ac398e61f58a86f4cfd2965ed48a7f9ab95 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Mon, 17 Jun 2024 20:48:38 -0400 Subject: [PATCH 1/5] 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 6e8c06b8ee5e80edd9b03c13839825d11e6061c9 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Tue, 18 Jun 2024 19:45:42 -0400 Subject: [PATCH 2/5] pin to wgpu<0.16.0, set pygfx max ver pin --- docs/source/user_guide/gpu.rst | 4 ++-- fastplotlib/utils/gui.py | 4 ++-- setup.py | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/source/user_guide/gpu.rst b/docs/source/user_guide/gpu.rst index f4ef89a0c..1bbc0c030 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.info) + pprint.pprint(a.request_adapter_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.info) + pprint.pprint(a.request_adapter_info()) # example, pick adapter at index 2 chosen_gpu = fpl.enumerate_adapters()[2] diff --git a/fastplotlib/utils/gui.py b/fastplotlib/utils/gui.py index 1f13c1406..1941674ee 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.info for a in adapters] + adapters_info = [a.request_adapter_info() for a in adapters] - default_adapter_info = wgpu.gpu.request_adapter().info + default_adapter_info = wgpu.gpu.request_adapter().request_adapter_info() default_ix = adapters_info.index(default_adapter_info) if len(adapters) > 0: diff --git a/setup.py b/setup.py index ef79e4774..f46de7e97 100644 --- a/setup.py +++ b/setup.py @@ -4,8 +4,7 @@ install_requires = [ "numpy>=1.23.0", - "wgpu>=0.16.0", - "pygfx>=0.1.14", + "pygfx>=0.1.14,<=0.2.0", ] From 3647a630a29bbb0694120e65adc6c3e0d3d2cf45 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Tue, 18 Jun 2024 19:59:50 -0400 Subject: [PATCH 3/5] pin wgpu max version for release --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index f46de7e97..7229dcf25 100644 --- a/setup.py +++ b/setup.py @@ -4,6 +4,7 @@ install_requires = [ "numpy>=1.23.0", + "wgpu<0.16.0", "pygfx>=0.1.14,<=0.2.0", ] From 5629a7f50803238e6fecfc0fb3130d158027e452 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Tue, 18 Jun 2024 20:04:13 -0400 Subject: [PATCH 4/5] another instance of reverting info to get_adapter_info --- examples/tests/testutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tests/testutils.py b/examples/tests/testutils.py index 0e4cd2e1b..3e992dd8d 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.info; print(info['adapter_type'], info['backend_type'])" + code = "import wgpu.utils; info = wgpu.utils.get_default_device().adapter.get_adapter_info(); print(info['adapter_type'], info['backend_type'])" result = subprocess.run( [ sys.executable, From 2a62f20e4ba9ef96b3f3afccffe5dfd994979f78 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Tue, 18 Jun 2024 20:09:03 -0400 Subject: [PATCH 5/5] typo --- examples/tests/testutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tests/testutils.py b/examples/tests/testutils.py index 3e992dd8d..22747ce08 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.get_adapter_info(); print(info['adapter_type'], info['backend_type'])" + code = "import wgpu.utils; info = wgpu.utils.get_default_device().adapter.request_adapter_info(); print(info['adapter_type'], info['backend_type'])" result = subprocess.run( [ sys.executable, 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