code: def _getArrays(items, attr, defaultValue):
      arrays = dict([(key, []) for key in attr])
      for item in items:
          for key in attr:
              arrays[key].append(getattr(item, key, defaultValue))
      for key in [_ for _ in viewkeys(arrays)]:
          arrays[key] = numpy.array(arrays[key])
      return arrays