I think you can use cdef here unless this is cAlled from Python