Linear Algebra

Sort by

recency

|

307 Discussions

|

  • + 0 comments

    The last of NUMPY I will see on Hackerrank

    import numpy
    print(round(numpy.linalg.det(numpy.array([list(map(float, input().split())) for _ in range(int(input()))])), 2))
    
  • + 0 comments

    Working with determinants can feel repetitive at first, but once you understand the structure it becomes clearer, almost like how the story shared in About Our Pilates Center explains balance and precision as the core of every practic

  • + 0 comments

    For Python3 Platform

    import numpy
    
    N = int(input())
    A = numpy.array([input().split() for _ in range(N)], float)
    
    print(round(numpy.linalg.det(A), 2))
    
  • + 0 comments

    import numpy as np

    N = int(input()) M = np.array([input().split() for _ in range(N)],float)

    A = np.linalg.det(M)

    print(np.round(A,2))

  • + 0 comments
    import numpy as np
    N = int(input())
    A = np.array([input().split() for _ in range(N)],float)
    print(round(np.linalg.det(A),2))