我正在使用Python语言编写一种A*路径查找算法,并将数据很好地放入具有以下数据类型的2D NumPy数组中: ('open', bool),])current := the node in openset having the lowest f_score[] value
此位将给出最低'f‘值的索引(工作
将数值绑定到某个范围内的好方法是什么?例如,假设我有一个值列表,我想按它们的范围将它们放入N个bin中。1# assign point to my bins best_bin= min_index(abs(my_bins - v))
其中min_index返回最小值的索引。我正在寻找的是一个很好的箱子的