What is the meaning of angle brackets in Python?
i found the following the Lines在scikit怡乐包装:P></
1 2 3 4 5 6 7 8 9 10 11 | 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: ... |
"在我的searches角brackets Python for answers about"给文件或decorator syntax,which is sure this漂亮的AM /曼弗雷迪或法拉利吗因为北样的实际逻辑。P></
什么我在the above the angle brackets和Python代码可以给我更多的learn about them?P></
这是cython用于类型转换/强制的语法。它不是普通的Python。注意文件扩展名是
您可以在Cython文档中了解更多关于它们的信息。
以下是从Doc页面中获取的示例:
1 2 | cdef char *p, float *q p = <char*>q |
使用cython在像
看看Cython文档,关于类型。
另外,您可以注意到文件扩展名是