diff --git a/pyproject.toml b/pyproject.toml index c0d7be98..f8659631 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ requires = [ "setuptools", "wheel", - "Cython==3.0a6", + "Cython>=3", ] build-backend = "setuptools.build_meta" diff --git a/src/ridepy/util/spaces_cython/boost_graph_space.h b/src/ridepy/util/spaces_cython/boost_graph_space.h index 09d75dd1..806ae969 100644 --- a/src/ridepy/util/spaces_cython/boost_graph_space.h +++ b/src/ridepy/util/spaces_cython/boost_graph_space.h @@ -109,11 +109,13 @@ class GraphSpace : public TransportSpace { GraphSpace(double velocity, vector vertex_vec, vector edge_vec, vector weight_vec) : TransportSpace(), - velocity(velocity), _g{vertex_vec.size()}, vertex2label{get(vertex_name, - _g)}, + velocity(velocity), + _g{vertex_vec.size()}, + vertex2label{get(vertex_name, _g)}, _distances(static_cast(vertex_vec.size())), _predecessors(static_cast(vertex_vec.size())), - _weights{weight_vec}, edge2weight{get(edge_weight, _g)} { + _weights{weight_vec}, + edge2weight{get(edge_weight, _g)} { // this->vertex2label = get(vertex_name, this->_g); // add vertex properties int idx = 0; diff --git a/src/ridepy/util/spaces_cython/spaces.pyx b/src/ridepy/util/spaces_cython/spaces.pyx index f1b18656..d6e170e8 100644 --- a/src/ridepy/util/spaces_cython/spaces.pyx +++ b/src/ridepy/util/spaces_cython/spaces.pyx @@ -475,19 +475,19 @@ cdef class Graph(TransportSpace): self.loc_type = LocType.INT if weights is None: - self.derived_ptr = self.u_space.space_int_ptr = new CGraphSpace[uiloc]( + self.derived_ptr = self.u_space.space_int_ptr = new CGraphSpace[ulonglong]( velocity, - vertices, - edges + vertices, + edges ) else: if isinstance(weights, (int, float)): weights = it.repeat(float(weights), len(edges)) - self.derived_ptr = self.u_space.space_int_ptr = new CGraphSpace[uiloc]( + self.derived_ptr = self.u_space.space_int_ptr = new CGraphSpace[ulonglong]( velocity, - vertices, - edges, + vertices, + edges, weights )