Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

ellipsis in python as index

#The ellipsis is used in numpy to slice higher-dimensional data structures.
#It's designed to mean at this point, insert as many full slices (:) 
#to extend the multi-dimensional slice to all dimensions. so e.g.
a = np.zeros((3,3,3))
a[::, 0]
#gives the same as
a[..., 0]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ellipsis #python #index
ADD COMMENT
Topic
Name
4+3 =