笛卡尔积的符号化为:
A×B={(x,y)|x∈A∧y∈B}
例如,A={a,b}, B={0,1,2},则
A×B={(a, 0), (a, 1), (a, 2), (b, 0), (b, 1), (b, 2)}
B×A={(0, a), (0, b), (1, a), (1, b), (2, a), (2, b)}
Numpy:x和y数组点的笛卡儿乘积成二维点的单个数组
两个numpy数组,它们定义了网格的x和y轴。例如:
x = numpy.array([1,2,3])y = numpy.array(