Python Array Slice With Comma?

It is being used to extract a specific column from a 2D array.

So your example would extract column 0 (the first column) from the first 2048 rows (0 to 2047). Note however that this syntax will only work for numpy arrays and not general python lists.

Leave a Comment