def _conjurePotentialPools(self, **kwargs):
# These only need to be fetched from the SP once.
if self._potentialPools:
return self._potentialPools
sp = self._sp
out = []
for colIndex in range(0, sp.getNumColumns()):
columnPool = self._getZeroedInput()
columnPoolIndices = []
sp.getPotential(colIndex, columnPool)
for i, pool in enumerate(columnPool):
if np.asscalar(pool) == 1.0:
columnPoolIndices.append(i)
out.append(columnPoolIndices)
self._potentialPools = out
return out
评论列表
文章目录