import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = [7.00, 3.50]
plt.rcParams["figure.autolayout"] = True
data = pd.read_csv('rand.csv')
dataarr = [data]
flist = []
slist = []
for test in dataarr:
a, b = divmod(test, 1)
flist.append(a)
slist.append(b)
x = np.array.sort([flist])
y = np.array([slist])
plt.switch_backend('agg')
plt.plot(x, y)
plt.show()
I enter all the data from the csv file (there is 1 line), I separate fractional and ordinary numbers and throw them into an array. (there is 1000 data on one column in the csv file) and this error occurs when outputting through the raft. x and y can be no greater than 2D, but have shapes (1, 1, 1000, 1) and (1, 1, 1000, 1) what I should do? Thank you!