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] What is wrong with this NumPy linear algebra matrix rank calculator?

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

  1. Stack

    Stack Membro Participativo

    Consider:

    import numpy as np
    from numpy.linalg import matrix_rank

    for i in range(1, 70):
    y = np.linspace(0,i, i+1)
    y = 2 ** y
    x = np.ones(i+1)
    matrix = np.stack([x,y])
    print(matrix_rank(matrix))


    After 48, I see the rank shifting from 2 to 1. How do I fix this?

    Continue reading...

Compartilhe esta Página