News for hackers. Stuff that matters.
Re:Why I often implement things from scratch (2006) by PureParadigm on Sunday March 08, 2020 @09:46PM (#22522192)
Compared to the library version:

  import numpy as np
  np.linalg.inv([[1,2],[3,4]])
and this does handle the case where the determinant is 0 (by throwing an error about it being a singular matrix).
Re:Why I often implement things from scratch (2006) by xaedes on Monday March 09, 2020 @08:50AM (#22524930)
Avoid np.linalg.inv if you can do it in another way.. It slows the already slow python even more. Recently replaced np.linalg.inv by an affine transformation inverse (what was really needed) in one of our codebases to get a speedup of 100x.