Numpy Maximum Recursion Depth