added functionality to the wrapper so that an array of ints can be returned to python (array of communities)