MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   Matlab和Python中的冒号差异 (https://www.labfans.com/bbs/showthread.php?t=24264)

poster 2019-12-10 20:48

Matlab和Python中的冒号差异
 
与Matlab的python中的someArray(:,1,1)等效吗?

在python中someArray[:][0][0]产生不同的值



[B]回答:[/B]

someArray[:,0,0]与MATLAB的someArray(:,1,1)的Python NumPy等效。我从来没有想过如何在纯Python中做到这一点,对于列表列表来说,冒号切片操作对我来说完全是个谜。



[url=https://stackoverflow.com/questions/4535359]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 01:12

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.