Python Code For Sum Of Array Matlab