MCPcopy Create free account
hub / github.com/NVlabs/LongLive / has_pos

Method has_pos

utils/error_buffer.py:201–206  ·  view source on GitHub ↗

Whether ANY owned timestep bucket at ``block_pos`` has samples (2D only).

(self, block_pos)

Source from the content-addressed store, hash-verified

199 return self.total_added == 0
200
201 def has_pos(self, block_pos):
202 """Whether ANY owned timestep bucket at ``block_pos`` has samples (2D only)."""
203 if self.num_blocks <= 0:
204 return not self.is_empty()
205 p = max(0, min(int(block_pos), self.num_blocks - 1))
206 return any(len(self.buckets[(p, t)]) > 0 for t in self._owned_t_buckets)
207
208 def stats(self):
209 filled = sum(1 for b in self.buckets.values() if len(b) > 0)

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.95

Tested by

no test coverage detected