立即学习:https://edu.csdn.net/course/play/25878/316060?utm_source=blogtoedu
fromfunction:
1.def f1(x,y):
return x+y
a1=np.fromfunction(f1,(3,3 ),dtype=int)
2.a1=np.fromfunction(lambda x,y:x+y,(3,3),dtype=int)
立即学习:https://edu.csdn.net/course/play/25878/316060?utm_source=blogtoedu
fromfunction:
1.def f1(x,y):
return x+y
a1=np.fromfunction(f1,(3,3 ),dtype=int)
2.a1=np.fromfunction(lambda x,y:x+y,(3,3),dtype=int)