Add ndim checks in filter.edges
Implement new assert_nD utility function
Merge pull request #1159 from blink1073/check-ndims-in-edges

Add ndim checks in filter.edges