1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] How to change a single value in a NumPy array?

Discussão em 'Python' iniciado por Stack, Setembro 15, 2024.

  1. Stack

    Stack Membro Participativo

    I want to change a single element of an array. For example, I have:

    A = np.array([1,2,3,4],
    [5,6,7,8],
    [9,10,11,12],
    [13,14,15,16])


    I want to relace A[2][1] = 10 with A[2][1] = 150. How can I do it?

    Continue reading...

Compartilhe esta Página