[Python] numpy.random - size and shape confusion

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

  1. Stack

    Stack Membro Participativo

    I was looking through some codes and saw this line, numpy.random.normal(size=x.shape). Where, x = numpy.linspace(1, 2, 100). I don't understand what this does. I've only come across, np.random.normal(size=1) before. Can someone please explain the difference in both the cases and their use.

    Continue reading...

Compartilhe esta Página