Fancy indexing
The at()
method was added in NumPy 1.8. This method allows fancy indexing in-place. Fancy indexing is indexing that does not involve integers or slices, which is normal indexing. In-place means that the array we operate on will be modified.
The signature for the at()
method is ufunc.at(a, indices[, b])
. The indices array specifies the elements to operate on. We need the b
array only for universal functions with two operands. The following Time for action section gives examples of the at()
method.