开发者

Colon difference in Matlab and Python

开发者 https://www.devze.com 2023-02-01 01:19 出处:网络
What is the equivalent to someA开发者_开发百科rray(:,1,1) in python from Matlab? In python someArray[:][0][0] produces a different valuesomeArray[:,0,0] is the Python NumPy equivalent of MATLAB\'s s

What is the equivalent to someA开发者_开发百科rray(:,1,1) in python from Matlab?

In python someArray[:][0][0] produces a different value


someArray[:,0,0] is the Python NumPy equivalent of MATLAB's someArray(:,1,1). I've never figured out how to do it in pure Python, the colon slice operation is a total mystery to me with lists-of-lists.

0

精彩评论

暂无评论...
验证码 换一张
取 消