From 4c4dbd96a2a14394de698acb60bcbed5583399b7 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Tue, 5 Nov 2024 11:38:45 -0500 Subject: [PATCH] Add another guard on dtype based on a field report --- sources/multi/large_image_source_multi/__init__.py | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/multi/large_image_source_multi/__init__.py b/sources/multi/large_image_source_multi/__init__.py index 890a8dd03..6ca7ac781 100644 --- a/sources/multi/large_image_source_multi/__init__.py +++ b/sources/multi/large_image_source_multi/__init__.py @@ -898,7 +898,7 @@ def _openSource(self, source, params=None): params = source.get('params', {}) ts = openFunc(source['path'], **params) if (self._dtype and np.dtype(ts.dtype).kind == 'f' and - np.dtype(self._dtype).kind != 'f' and + (self._dtype == 'check' or np.dtype(self._dtype).kind != 'f') and 'sampleScale' not in source and 'sampleOffset' not in source): minval = maxval = 0 for f in range(ts.frames): diff --git a/tox.ini b/tox.ini index 177bc29c9..a74cbdf2f 100644 --- a/tox.ini +++ b/tox.ini @@ -62,7 +62,7 @@ setenv = # installs in editable mode, which then includes results in coverage. [testenv:test-py{38,39,310,311,312,313}] # Don't package for tests where we use editable modes -package=skip +package=editable passenv = {[testenv:test]passenv} extras = {[testenv:test]extras} deps =