第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

在python中使用子進(jìn)程找不到文件錯(cuò)誤

在python中使用子進(jìn)程找不到文件錯(cuò)誤

函數(shù)式編程 2023-02-22 16:04:32
您需要?jiǎng)?chuàng)建一個(gè)函數(shù)來一次性處理輸入、積分和繪圖 ( sir_interactive_func),見下文:# For integration.import scipy.integrate # For arrays (Python does not have native arrays).import numpy as np# For graphing.import matplotlib.pyplot as plt # Prevents the pop-up graphs in a separate window.get_ipython().run_line_magic('matplotlib', 'inline')# Allows for an interactive widget bar.from ipywidgets import interactive S0 = 0.95I0 = 0.05R0 = 0.0def SIR_model(y, t, beta, gamma):    S, I, R = y        dS_dt = -beta*S*I    dI_dt = beta*S*I - gamma*I    dR_dt = gamma*I        return([dS_dt, dI_dt, dR_dt,])    def sir_interactive_func(beta, gamma):        # Graph from 0 to 100, include 10000 points.    t = np.linspace(0, 100, 10000)         solution = scipy.integrate.odeint(SIR_model, [S0, I0, R0], t, args=(beta, gamma))    solution = np.array(solution)    plt.figure(figsize=[8, 5])    plt.plot(t, solution[:, 0], label="S(t)")    plt.plot(t, solution[:, 1], label="I(t)")    plt.plot(t, solution[:, 2], label="R(t)")    plt.grid()    plt.legend()    plt.title("SIR Model")    plt.xlabel("Time")    plt.ylabel("Proportions of Populations")    interactive_plot = interactive(sir_interactive_func, beta=(0.35,1,0.01), gamma=(0.1,1,0.01))interactive_plot
查看完整描述

1 回答

?
收到一只叮咚

TA貢獻(xiàn)1821條經(jīng)驗(yàn) 獲得超5個(gè)贊

要執(zhí)行文件,您必須使用 './filename'

通過閱讀您的上述評論,您必須授予文件可執(zhí)行權(quán)限,可以這樣做:

chmod +x ais

其原因在這里得到了很好的解釋:https://unix.stackexchange.com/a/4432/399463


查看完整回答
反對 回復(fù) 2023-02-22
  • 1 回答
  • 0 關(guān)注
  • 141 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號