Description

# Only compute func if some points are available; otherwise, default to NaN.

pointsInCluster = (clusterId == i)

if numpy.any(pointsInCluster):

centers[i] = func(yvec[pointsInCluster])

where `func` has been assigned to `numpy.mean`. When I have seen this occur I have found that `dist` is an array of `nan`

I suggest that the star selector handle this situation more gracefully, e.g. by reporting an appropriate exception or handling the data in an appropriate way. If logging a message would be helpful, then please do that (and if RFC-154 is adopted, a log will be available).

One way to reproduce this is to run `tests/testProcessCcd.py` in `pipe_tasks`. However, I often see it when running `processCcd.py` on other data, as well.