Limitations to Indexing into Python Objects

You can access data in Python® container objects, like lists and dictionaries, with index values, similar to referencing an element in a MATLAB® matrix. There are, however, ways to index into matrices which are not supported for these Python types.

Indexing Features Not Supported in MATLAB

Use of square brackets, [].

Indexing into a container type that does not inherit from collections.Sequence or collections.Mapping.

Logical indexing.

Accessing data in a container with an arbitrary array of indices. An index must be of the form start:step:stop.

Comma-separated lists.

numel function does not return number of array elements. Returns 1.

Related Topics