Check size of vectors for operations that need it.
Merge pull request #21 from Moredread/moredread/fix/vector_dimension_check

Check size of vectors for operations that need it.