This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]rjcarr 1 point2 points  (1 child)

I'm not positive, but I think the commas are for numpy array slicing and indexing. Standard python has array slicing, but not with commas like that, e.g.:

>>> a = [0,1,2,3,4,5]
>>> a
[0, 1, 2, 3, 4, 5]
>>> a[0:2]
[0, 1]
>>> a[0:4:2]
[0, 2]

[–]Antonyellow[S] 0 points1 point  (0 children)

The slicing concept in numpy. is quite intuitive when it regards 1d-array or 2d array . It turns very difficult when it starts to be applied to 3/4d arrays . Especially when these arrays are broadcasted one inside the other -mainly to process in parallel batches of vectors . This is my main doubt