mitodl / mitx-grading-library

The MITx Grading Library, a python grading library for edX
https://edge.edx.org/courses/course-v1:MITx+grading-library+examples/
BSD 3-Clause "New" or "Revised" License
14 stars 9 forks source link

Negative Powers to Zero-Det Matrix Not Handled #131

Closed jolyonb closed 6 years ago

jolyonb commented 6 years ago

If you raise a matrix with zero determinant to a negative power, the raw error from np.linalg.pow is raised, rather than catching the error beforehand and presenting a nice error message.

ChristopherChudzicki commented 6 years ago

Good point. Probably a simple try/catch in MathArray's pow method.

ChristopherChudzicki commented 6 years ago

@jolyonb We had talked about rolling this into #134, but I did not address it yet. Partly because it seems separate issue, but mostly because #134 is ready for review and I should work on my classes :)

But if this is causing problems for anyone you know of, let me know and I'll make the time soon.

jolyonb commented 6 years ago

No, no rush at all.

ChristopherChudzicki commented 6 years ago

@jolyonb I should have deleted that comment :) I decided it was easy and so I did it. #136

jolyonb commented 6 years ago

Ah, I started with the earliest email from you and began working my way up ;-)