【发布时间】:2017-08-24 10:15:47
【问题描述】:
我在 scikit-learn 包中找到了the following lines:
if is_sparse:
problem = csr_set_problem(
(<np.ndarray[np.float64_t, ndim=1, mode='c']>X.data).data,
(<np.ndarray[np.int32_t, ndim=1, mode='c']>X.indices).shape,
(<np.ndarray[np.int32_t, ndim=1, mode='c']>X.indices).data,
(<np.ndarray[np.int32_t, ndim=1, mode='c']>X.indptr).shape,
(<np.ndarray[np.int32_t, ndim=1, mode='c']>X.indptr).data,
Y.data, (<np.int32_t>X.shape[1]), bias,
sample_weight.data)
else:
...
我对“Python 中的尖括号”的所有搜索都给出了关于 documentation 或 decorator syntax 的答案,我很确定这两者都不是,因为它看起来像实际逻辑。
上述 Python 代码中的尖括号有什么作用,我在哪里可以了解更多关于它们的信息?
【问题讨论】: