initial index in array code example
Example 1: find first in np arrau
>>> t = array([1, 1, 1, 2, 2, 3, 8, 3, 8, 8])
>>> nonzero(t == 8)
(array([6, 8, 9]),)
>>> nonzero(t == 8)[0][0]
6
Example 2: element assignment numpy matrix
import numpy
dimensions = (3, 3)
a = numpy.zeros(dimensions)
a[0, 0] = 1