MCPcopy Create free account
hub / github.com/apple/ml-pointersect / __len__

Method __len__

cdslib/core/data/chunked_memmap.py:138–142  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

136 json.dump(info_dict, outfile, indent=4, cls=NumpyJsonEncoder)
137
138 def __len__(self):
139 if self.chunk_idxs is None:
140 return 0
141 else:
142 return len(self.chunk_idxs)
143
144 def __getitem__(self, idx: int):
145 """Return the ith's sample (in global index) as if calling samples[idx].

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected