0

I've come across the following in some python code.

states.append(self.frames[idx-self.frame_count:idx, ...])

but I don't know what '...' means, nor can I find anything on it online.

Any help would be appreciated.

I've tried searching for answers online but search engines don't seem to interpret ... as being relevant to the search.

  • 1
    https://docs.python.org/3/library/constants.html#Ellipsis – alex Jan 30 '23 at 23:04
  • 1
    It means whatever `self.frames.__getitem__` defines it to mean. – chepner Jan 30 '23 at 23:05
  • 1
    That could depend on the type of `frames`, what library is it from, Numpy? Check the docs for whichever library it is. – Dan Getz Jan 30 '23 at 23:06
  • (That said, `...` was added, if i recall correctly, to the language specifically for NumPy to use as a sentinel for indexing multidimensional arrays.) – chepner Jan 30 '23 at 23:07

0 Answers0