Linear Algebra

Sort by

recency

|

287 Discussions

|

  • + 0 comments
    import numpy as np
    arr = []
    for i in range(int(input())):
        a = list(map(float, input().split()))
        arr.append(a)
    
    print(round(np.linalg.det(arr), 2))
    
  • + 0 comments

    Here's my code:

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

    import numpy n = int(input()) a = ([list(map(float, input().split()))for i in range(n)]) a = numpy.array(a) print(round(numpy.linalg.det(a),2))

  • + 0 comments
    n = int(input())
    a = numpy.array([list(map(float, input().split())) for i in range(n)])
    b = round(numpy.linalg.det(a),2)
    print(b)
    
  • + 0 comments

    import numpy as np

    n = int(input())

    arr = []

    for _ in range(n): a = [list(map(float, input().split()))] arr.extend(a)

    print(round(np.linalg.det(np.array(arr)), 2))