itemsize#

ivy.itemsize(x, /)[source]#

Return the size of the input array’s elements.

Parameters:

x (Union[Array, NativeArray]) – The input array.

Return type:

int

Returns:

ret – An integer specifying the element size in bytes.

Examples

>>> x = ivy.array([1,2,3], dtype=ivy.float64)
>>> ivy.itemsize(x)
8
>>> x = ivy.array([1,2,3], dtype=ivy.complex128)
>>> ivy.itemsize(x)
16
Array.itemsize()#

Size of array elements in bytes.

Container.itemsize(self, /)[source]#

Container instance method variant of ivy.itemsize. This method simply wraps the function, and so the docstring for ivy.itemsize also applies to this method with minimal changes.

Parameters:

self (Container) – The input container.

Return type:

Container

Returns:

ret – Integers specifying the element size in bytes.