Skip to content

Commit ca92487

Browse files
authored
Update max value of test_align_with_mag_against_numpy_implementation. (#1082)
* Update max value of test_align_with_mag_against_numpy_implementation. * Update changelog.
1 parent 818baab commit ca92487

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

webknossos/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ For upgrade instructions, please check the respective _Breaking Changes_ section
2121

2222
### Changed
2323
- Moved functional parts of merge volume annotation CLI to Dataset and Annotation classes. [#1055](https://github.com/scalableminds/webknossos-libs/pull/1055)
24+
- Set a new max value for test_align_with_mag_against_numpy_implementation to avoid failures due to high numbers. [#1082](https://github.com/scalableminds/webknossos-libs/pull/1082)
2425

2526
### Fixed
2627
- Fixed an issue with downloading annotations through the Command Line Interface. [#1083](https://github.com/scalableminds/webknossos-libs/pull/1083)

webknossos/tests/geometry/test_bounding_box.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ def test_align_with_mag_against_numpy_implementation(
8585
bb.align_with_mag(mag, ceil)
8686
else:
8787
# The slower numpy implementation is wrong for very large numbers:
88-
if all(i < 12e15 for i in bb.bottomright):
88+
# Floating point precision for 64 bit floats is not capable of representing
89+
# numbers larger than 2**53 accurately.
90+
if all(i < 2**53 for i in bb.bottomright):
8991
assert bb.align_with_mag(mag, ceil) == slow_np_result
9092

9193

0 commit comments

Comments
 (0)