March 2003
Intermediate to advanced
656 pages
39h 30m
English
indices
indices(shapetuple,typecode=None)
Returns an integer array x of shape
(len(
shapetuple
),)+
shapetuple.
Each element of subarray
x
[
i
]
is equal to the element’s
i index in the subarray. For example:
print Numeric.indices((2,4)) # prints: [[[0 0 0 0]
# [1 1 1 1]]
# [[0 1 2 3]
# [0 1 2 3]]]