-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain1.py
21 lines (20 loc) · 918 Bytes
/
main1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import pandas as pandas
import numpy as numpy
matrixA = numpy.array(pandas.read_csv("MatrixA.csv", sep =',', header = None, index_col = False))#.astype("float")
numberOfRows_MatrixA, numberOfColumns_MatrixA = matrixA.shape
vectorB = numpy.array(pandas.read_csv("VectorB.csv", sep =',', header = None, index_col = False))#.astype("float")
numberOfRows_VectorB, numberOfColumns_VectorB = vectorB.shape
print("Matrix A\t\t\tVector B")
for i in range(numberOfRows_MatrixA):
for j in range(numberOfColumns_MatrixA):
space = ' '
if(matrixA[i][j] < 0):
space = ''
print(space + format(numpy.round(matrixA[i][j], 2)), end = "\t")
print(" ", end = "\t")
for j in range(numberOfColumns_VectorB):
space = ' '
if(vectorB[i][j] < 0):
space = ''
print(space + format(numpy.round(vectorB[i][j], 2)), end = "\t")
print(" ")