__index__¶
- array.__index__() int¶
Converts a zero-dimensional integer array to a Python
intobject.Note
This method is called to implement operator.index(). See also PEP 357.
- Parameters:
self (array) – zero-dimensional array instance. Should have an integer data type. If
selfhas a floating-point data type, the function must raise aTypeError.- Returns:
out (int) – a Python
intobject representing the single element of the array instance.