Skip to content

Commit afe97ce

Browse files
authored
Fix serialization of existing properties with floats as dtype (#375)
* fix serialization of existing properties with floats as dtype * update changelog
1 parent d9f15a7 commit afe97ce

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ For upgrade instructions, please check the respective *Breaking Changes* section
1717
- Bump scipy to `1.6.0` and `scikit-image` to `0.18.0` while keeping `numpy` to under `1.20.0` [#372](https://github.com/scalableminds/webknossos-cuber/pull/372/files)
1818

1919
### Fixed
20+
- Fixes a bug where modifications to an existing dataset with floats as dtype failed. [#375](https://github.com/scalableminds/webknossos-cuber/pull/375)
2021

2122
## [0.8.6](https://github.com/scalableminds/webknossos-cuber/releases/tag/v0.8.6) - 2021-07-29
2223
[Commits](https://github.com/scalableminds/webknossos-cuber/compare/v0.8.5...v0.8.6)

wkcuber/api/properties/layer_properties.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ def _extract_num_channels(
4646

4747

4848
properties_floating_type_to_python_type = {
49-
"float": np.dtype("float32"),
50-
np.float: np.dtype("float32"),
51-
float: np.dtype("float32"),
52-
"double": np.dtype("float64"),
49+
"float": "float32",
50+
np.float: "float32",
51+
float: "float32",
52+
"double": "float64",
5353
}
5454

5555
python_floating_type_to_properties_type = {

0 commit comments

Comments
 (0)