Skip to content

Commit

Permalink
Merge pull request #284 from EIT-ALIVE/hotfix_copy_arrays_when_slicing
Browse files Browse the repository at this point in the history
Fix: copy numpy arrays when slicing
  • Loading branch information
psomhorst authored Jul 24, 2024
2 parents 7910f85 + 877548e commit 65d756d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ authors:

date-released: 2023-03-23
doi: 10.5281/zenodo.7869553
version: "1.1.0"
version: "1.1.1"
repository-code: "git@github.com:EIT-ALIVE/eitprocessing"
keywords:
- Mechanical lung ventilation
Expand Down
2 changes: 1 addition & 1 deletion eitprocessing/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.0"
__version__ = "1.1.1"
4 changes: 2 additions & 2 deletions eitprocessing/datahandling/continuousdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ def _sliced_copy(
) -> Self:
# TODO: check correct implementation
cls = self.__class__
time = self.time[start_index:end_index]
values = self.values[start_index:end_index]
time = np.copy(self.time[start_index:end_index])
values = np.copy(self.values[start_index:end_index])
description = f"Slice ({start_index}-{end_index}) of <{self.description}>"

return cls(
Expand Down
4 changes: 2 additions & 2 deletions eitprocessing/datahandling/eitdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ def _sliced_copy(
newlabel: str, # noqa: ARG002
) -> Self:
cls = self.__class__
time = self.time[start_index:end_index]
time = np.copy(self.time[start_index:end_index])
nframes = len(time)

pixel_impedance = self.pixel_impedance[start_index:end_index, :, :]
pixel_impedance = np.copy(self.pixel_impedance[start_index:end_index, :, :])

return cls(
path=self.path,
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "eitprocessing"
version = "1.1.0"
version = "1.1.1"
description = "Processing of lung image data from electrical impedance tomography."
readme = "README.md"
requires-python = ">=3.10"
Expand Down Expand Up @@ -156,7 +156,7 @@ isort.known-first-party = ["eitprocessing"]
"docs/*" = ["ALL"]

[tool.bumpversion]
current_version = "1.1.0"
current_version = "1.1.1"

[[tool.bumpversion.files]]
filename = "pyproject.toml"
Expand Down

0 comments on commit 65d756d

Please sign in to comment.