Created a test showing that new bounding box after resampling using 4D affine, but without specifying new shape can completely miss the data.
fixed shape adaptation problem
added test for new shape
TDD, provided cases where Exceptions should be raised. Added BoundingBoxException
Refactored resample_img, raising appropriate exceptions when necessary
Added documentation
Wrote failing test for 3x3 affine issue
Added tests for axis permutation matrices
Tests passing
Addressing Gael's comments
Removed target_affine_ by overwriting target_affine and setting missing_offset=True/False
Commented assert_raise_message and added assert_raises in order to be compliant with backwards compatibility requirements wrt sklearn
added an example for visualizing affine transform
elaborated on bounding box error
Image image typo
embellished docstring
corrected error message
removed docstring embellishment, added reference to notes
removed np.array(list) where not necessary
indentation