简体   繁体   中英

Data type of attributes in igraph, python

In order to speed up my code, I am using Cython. I was wondering whether it is possible to fix the type of attributes for a Graph object in igraph?

Attributes in igraph are returning PyObject s so no, you cannot type them in Cython.

However, depending on your use case, it may be useful to pre-assign the attributes to a typed c++ vector or a C array, then work on this vector/array.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM