Pipin System Hydraulic Calculation in Python/numpy