def _create_dijkstra_map(center,source_map,targets,size=(50,50),flee=False,**kvargs):
	if not targets:
		raise Exception('No targets passed to create_dijkstra_map()')
	
	_target_positions = [tuple(target['position']) for target in targets]
	
	_min_x = clip(center[0]-(size[0]),0,MAP_SIZE[0])
	_max_x = clip(center[0]+(size[0]),0,MAP_SIZE[0])
	
	_min_y = clip((size[1])-center[1],0,MAP_SIZE[1])
	_max_y = clip(center[1]+(size[1]),0,MAP_SIZE[1])
	
	_stime = time.time()
	
	_map = numpy.ones((_max_y,_max_x))
	_orig_map = None
	
	for target in targets:
		_map[target['position'][1]-_min_y,target['position'][0]-_min_x] = 0#target['score']
	
	_map*=30
	
	for x in range(_min_x,_max_x):
		for y in range(_min_y,_max_y):			
			if source_map[x][y][center[2]+1]:
				if flee:
					_map[y-_min_y,x-_min_x] = 1
				else:
					_map[y-_min_y,x-_min_x] = -1
				
				continue
	
	_dijkstra = {'map': _map,
		'x_range': (_min_x,_max_x),
		'y_range': (_min_y,_max_y),
		'targets': targets}
	
	calculate_dijkstra_map(_dijkstra)
	
	if flee:
		create_flee_map(_dijkstra)
		#_create_dijkstra_map(center,source_map,targets,size=size)
		calculate_dijkstra_map(_dijkstra)
	
	logging.info('Dijkstra map took: %s, size %s,%s' % (str(time.time()-_stime),(_max_x-_min_x),(_max_y-_min_y)))
	print 'Dijkstra map took: %s, size %s,%s, %s' % (str(time.time()-_stime),(_max_x-_min_x),(_max_y-_min_y),0)
	
	return _dijkstra
dataset/ETHPy150Open flags/Reactor-3/numbers.py/_create_dijkstra_map/swapped operands of `-`