nick34992
6/28/2017 - 1:40 AM

Python: numpy.vectorize(a,b)

Python: numpy.vectorize(a,b)

import numpy as np

def big_a(a,b):
    if a > b:
        return a - b
    else:
        return a + b

vfunc = np.vectorize(big_a)

print(vfunc([1,2,3,4],[4,3,2,1]))