如下
import numpy a = [1, 2, 3, 4] b = [5, 6, 7, 8] a_array = numpy.array(a) b_array = numpy.array(b) c_array = a_array + b_array d_array = a_array - b_array print c_array print d_array
如下
import numpy a = [1, 2, 3, 4] b = [5, 6, 7, 8] a_array = numpy.array(a) b_array = numpy.array(b) c_array = a_array + b_array d_array = a_array - b_array print c_array print d_array