Python get angle from slope. The same principle can be used with numpy.