[Python] python simple example - ValueError: setting an array element with a sequence

Discussão em 'Python' iniciado por Stack, Fevereiro 9, 2025.

  1. Stack

    Stack Membro Participativo

    When I execute this python code, I got an error message : ValueError: setting an array element with a sequence.

    What's the problem? could you help me?

    a=np.array([1,3,5,7,9], dtype=int)
    c=np.array([3,4,7,8,9], dtype=int)
    b=np.zeros(len(a))

    for i in range(len(a)):
    b= np.where(a == int(c))

    Continue reading...

Compartilhe esta Página