I'm trying to create a matrix of floats from the user's input.
I've tried this code:
import numpy as np
m = int(input('Number of lines m: '))
matrix = []
for i in range(m):
# taking row input from the user
row = list(map(int, input(f'Line {i} ').split()))
# appending the 'row' to the 'matrix'
matrix.append(row)
print(matrix)
How can I turn that into a numpy matrix of floats?