我有 2 个归一化函数:norm1 和 norm2。
norm1 =: (- <./) % >./ - <./
norm2 =: %(>./@:|)
Run Code Online (Sandbox Code Playgroud)
我想将这两个函数应用于以下输入的每一行,如下所示:
input123 =: i. 2 10
|:(norm1 0{input123),.(norm2 1{input123)
0 0.111111 0.222222 0.333333 0.444444 0.555556 0.666667 0.777778 0.888889 1
0.526316 0.578947 0.631579 0.684211 0.736842 0.789474 0.842105 0.894737 0.947368 1
Run Code Online (Sandbox Code Playgroud)
有没有更简单的方法可以将多个动词应用于输入数组的每一行,而不是使用{从 中提取每一行input123?也许通过制作一组动词并将它们应用于输入的每一行?
它不必是一条线,它可以是每个元素("0),或矩阵("2)用于更高维的输入数据等
提前感谢您的建议。=]
我想将熊猫数据框保存为pdf格式。
import pdfkit as pdf
config = pdf.configuration(wkhtmltopdf="C:\Program Files\wkhtmltopdin\wkhtmltopdf.exe")
pdf.from_url('http://google.com', 'out.pdf',configuration=config)
--> not working somehow even though I downloaded wkhtmltopdin on several different locations
from weasyprint import HTML
HTML(string=pd.read_csv('cor.csv').to_html()).write_pdf("report.pdf")
dlopen() failed to load a library: cairo / cairo-2 / cairo-gobject-2
--> not working : Tried several times to solve this isseue, but cannot download library
Run Code Online (Sandbox Code Playgroud)
我在stackoverflow和其他网站中尝试了5个以上的软件包和方法,但无法解决。
还有更多可以尝试的软件包吗?这给我带来了癌症
提前致谢。