Python: a special 2d array

前端 未结 0 1474
挽巷
挽巷 2021-01-24 12:01

I need to make a 2D array of n by n which looks like the following

lets take n equals 5 for example

n = 5
A = np.array([[1,2,3,4,5],[2,3,4,5,6],[3,4,5,6,7]         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题