Colon difference in Matlab and Python

What is equivalent to someArray(:,1,1) in python from Matlab?

In python someArray[:][0][0] another value is created

+4
source share
1 answer

someArray[:,0,0] is the Python equivalent of NumPy for MATLAB someArray(:,1,1) . I never figured out how to do this in pure Python, the operation of the colon fragment is a complete mystery to me with lists of lists.

+5
source

Source: https://habr.com/ru/post/1333417/


All Articles