[Python] Difference between "size" and "itemsize" in Numpy

Discussão em 'Python' iniciado por Stack, Julho 3, 2025.

  1. Stack

    Stack Membro Participativo

    I have been studying for numpy library in python.

    I used the code

    import numpy as np
    arr=np.array([(11,12,13),(17,18,19)])
    arr.size


    and it's output is 6

    That is right but

    when I run

    import numpy as np
    arr=np.array([(11,12,13),(17,18,19)])
    arr.itemsize


    this code giving me 8 output.

    I am not able to understand

    Continue reading...

Compartilhe esta Página