uwhpsc-2016 / homework2

Homework #2
0 stars 3 forks source link

No Dimension Mismatch Error in some Python Wrappers #10

Open rachka opened 8 years ago

rachka commented 8 years ago

I've noticed that some Python wrappers like vec_add don't raise an error if there is a dimension mismatch. Should we account for dimension mismatch being a possibility either through tests or source code or not worry about dimension mismatch? The rubric for the tests does not mention error raising for dimension mismatch.

mvelegar commented 8 years ago

Hi @rachka, I would say don't worry about the dimension mismatch since it is not mentioned in the rubric or included in the Python wrappers.

cswiercz commented 8 years ago

However, that is a great observation! In your actual production codes / the code you will write for your own work in the future you may want to make that dimension check. Recall from Lecture 08 that comparison operators (<, >, etc.) are very cheap!