Python Derivative Of Array Definition Math