import os
import numpy as np
import matplotlib.pyplot as plt
# Open a file
path = "input/"
filelist = list(filter(lambda s: s.endswith(".asc"), os.listdir(path)))
firstImage = np.genfromtxt (" ".join(ln.split()[1:]) for ln in path+next(iter(filelist)))
怎么了? 越来越:类型错误:无法将“字节”对象str的隐