学习笔记(11):NumPy数据分析-NumPy创建数组的方法-fromfunction

立即学习: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)

发布了24 篇原创文章 · 获赞 8 · 访问量 1169

猜你喜欢

转载自blog.csdn.net/qq_41739233/article/details/104241626