[Python] TypeError: Field elements must be 2- or 3-tuples, got '5.0'

Discussão em 'Python' iniciado por Stack, Dezembro 20, 2024.

  1. Stack

    Stack Membro Participativo

    import numpy as np
    a = np.array([8.0,7.0,6.0],[5.0,4.0])
    print(a)


    I am trying to run this code but I get this error. (In Jupiter)


    TypeError Traceback (most recent call last)
    <ipython-input-3-31ad187a1d2f> in <module>
    1 import numpy as np
    ----> 2 a = np.array([8.0,7.0,6.0],[5.0,4.0])
    3 print(a)

    TypeError: Field elements must be 2- or 3-tuples, got '5.0'

    Continue reading...

Compartilhe esta Página