什么" [,"意味着在Python参数?

时间:2017-12-05 05:52:27

标签: python

" [,]"在Python中意味着什么?它们可以在输入参数中看到,例如:

cv2.Canny(image, threshold1, threshold2[, edges[, apertureSize[, L2gradient]]])

或scikit-learn; (例如sklearn.linear_model.LinearRegression):

fit(X, y[, sample_weight])  Fit linear model.

y [,sample_weight]究竟是什么意思?它是否意味着像数组中的第一个维度?

y[:,sample_weight]

更新: 谢谢你的答案,这意味着可选。但他们为什么要嵌套呢?

threshold2[, edges[, apertureSize[, L2gradient]]]

0 个答案:

没有答案
相关问题