Add logging to NeighborList

This commit is contained in:
Florian Bruhin 2014-02-20 20:46:05 +01:00
parent 7d11790d35
commit 4f6e149289

View File

@ -17,6 +17,8 @@
"""Custom useful datatypes."""
import logging
# Used as default argument in the constructor so default can be None.
_UNSET = object()
@ -77,6 +79,8 @@ class NeighborList:
"""
# FIXME - zooming somehow wraps...
logging.debug("{} items, idx {}, offset {}".format(len(self._items),
self.idx, offset))
if not self._items:
raise IndexError("No items found!")
try: