- Check for existence of astype.
This commit is contained in:
2
.github/workflows/pytest.yml
vendored
2
.github/workflows/pytest.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
os: [ubuntu-20.04, windows-2019, macOS-11]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "tiffwrite"
|
||||
version = "2024.2.1"
|
||||
version = "2024.2.2"
|
||||
description = "Parallel tiff writer compatible with ImageJ."
|
||||
authors = ["Wim Pomp, Lenstra lab NKI <w.pomp@nki.nl>"]
|
||||
license = "GPL-3.0-or-later"
|
||||
|
||||
@@ -406,7 +406,7 @@ class IJTiffFile:
|
||||
assert (c, z, t) not in self.pool.tasks, f'frame {c} {z} {t} is added already'
|
||||
assert all([0 <= i < s for i, s in zip((c, z, t), self.shape)]), \
|
||||
'frame {} {} {} is outside shape {} {} {}'.format(c, z, t, *self.shape)
|
||||
self.pool(frame.astype(self.dtype) if isinstance(frame, np.ndarray) else frame, handle=(c, z, t))
|
||||
self.pool(frame.astype(self.dtype) if hasattr(frame, 'astype') else frame, handle=(c, z, t))
|
||||
if extratags:
|
||||
self.frame_extra_tags[(c, z, t)] = Tag.to_tags(extratags)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user