Linear Algebra

Sort by

recency

|

291 Discussions

|

  • [deleted]Challenge Author
    + 0 comments

    For Python3

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

    code

    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

    import numpy my_arr = [] for _ in range(int(input())): my_arr.append(list(map(float, input().strip().split()))) print(round(numpy.linalg.det(my_arr), 2))

  • + 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))