fix routing
This commit is contained in:
parent
e48c6b2d04
commit
d3bbcc598b
1 changed files with 3 additions and 0 deletions
|
@ -271,6 +271,9 @@ class GraphRoom():
|
|||
ctype_factors = np.ones((len(self.ctypes), 1, 1))*1000
|
||||
ctype_factors[ctypes, :, :] = 1
|
||||
|
||||
if not self.distances.size:
|
||||
return RoomRouter(np.ones((0, 0), dtype=int), np.ones((0, 0), dtype=int))
|
||||
|
||||
distances = np.amin(self.distances*ctype_factors, axis=0).astype(np.float32)
|
||||
factors = np.ones_like(distances, dtype=np.float16)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue