2
示例代碼形式scipy document:python:任何使用這個任務到一個空的列表?
from scipy.stats import norm
numargs = norm.numargs
[ ] = [0.9,] * numargs
rv = norm()
我完全搞不清什麼是三線在這裏做。任何人都可以解釋嗎?
示例代碼形式scipy document:python:任何使用這個任務到一個空的列表?
from scipy.stats import norm
numargs = norm.numargs
[ ] = [0.9,] * numargs
rv = norm()
我完全搞不清什麼是三線在這裏做。任何人都可以解釋嗎?
我對此調用了shenanigans。因此,numargs
的型號爲int
,如果它不是0
,則此代碼將失敗。本質上這個代碼只是[]=[]
這對我來說似乎完全沒有意義。
這可能是剛剛從文檔的遺蹟,如下面的農作物了別處:
>>> from scipy.stats import nct
>>> numargs = nct.numargs
>>> [ df, nc ] = [0.9,] * numargs
>>> rv = nct(df, nc)
可能產生的例子是汽車。所有其他發行版的例子都有類似的格式。
自動生成。合理! –