-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add explicit _offsets_to_raveled_neighbors tests
The explicit tests are meant to catch subtle changes in the order of neigbors with the same connectivity. They were reviewed by constructing an image of the given shape and filling in the raveled image around the image center and manual inspection of the result. E.g. with image = np.zeros(image_shape) image_raveled = image.ravel() image_center = tuple(s // 2 for s in image_shape) image_center_raveled = np.ravel_multi_index( image_center, image_shape ) for i, offset in enumerate(offsets): index = image_center_raveled + offset assert image_raveled[index] == 0 image_raveled[index] += i + 1
- Loading branch information
Showing
1 changed file
with
82 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters