Added check for empty string in result iterator; fixes crash bug.
Added #define that removes NumPy's deprecation warning.