# Buggy code
def get_measurements(self, pipeline, object_name, category):
    if object_name == self.parent_name.value:
        if category == "Mean_{}".format(self.sub_object_name.value):
            measurements = []

            child_columns = self.get_child_columns(pipeline)

            measurements += [column[1] for column in child_columns]

            return measurements
        elif category == "Children":
            return ["{}_Count".format(self.sub_object_name.value)]
    elif object_name == self.sub_object_name.value and category == "Parent":
        return [self.parent_name.value]
    elif object_name == self.sub_object_name.value and category == C_DISTANCE:
        result = []

        if self.find_parent_child_distances in (D_BOTH, D_CENTROID):
            result += [
                "{}_{}".format(FEAT_CENTROID, parent_name)
                for parent_name in self.get_parent_names()
            ]

        if self.find_parent_child_distances in (D_BOTH, D_MINIMUM):
            result += [
                "{}_{}".format(FEAT_MINIMUM, parent_name)
                for parent_name in self.get_parent_names()
            ]

        return result

    return []


# Traceback (ValueError)
Traceback (most recent call last):
File "C:\Users\brayma2\Desktop\GitHub\CellProfiler\cellprofiler\gui\pipelinecontroller.py", line 2844, in do_step
self.__pipeline.run_module(module, workspace)
File "C:\Users\brayma2\Desktop\GitHub\CellProfiler\cellprofiler\pipeline.py", line 2108, in run_module
module.run(workspace)
File "C:\Users\brayma2\Desktop\GitHub\CellProfiler\cellprofiler\modules\relateobjects.py", line 252, in run
self.calculate_centroid_distances(workspace, parent_name)
File "C:\Users\brayma2\Desktop\GitHub\CellProfiler\cellprofiler\modules\relateobjects.py", line 336, in calculate_centroid_distances
parents_of = self.get_parents_of(workspace, parent_name)
File "C:\Users\brayma2\Desktop\GitHub\CellProfiler\cellprofiler\modules\relateobjects.py", line 475, in get_parents_of
reverse_lookup_len = max(np.max(primary_parents_of) + 1,
File "C:\Python27\lib\site-packages\numpy\core\fromnumeric.py", line 2263, in amax
out=out, keepdims=keepdims)
File "C:\Python27\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity

# Fixed code
def get_measurements(self, pipeline, object_name, category):
    if object_name == self.x_name.value:
        if category == "Mean_{}".format(self.y_name.value):
            measurements = []

            child_columns = self.get_child_columns(pipeline)

            measurements += [column[1] for column in child_columns]

            return measurements
        elif category == "Children":
            return ["{}_Count".format(self.y_name.value)]
    elif object_name == self.y_name.value and category == "Parent":
        return [self.x_name.value]
    elif object_name == self.y_name.value and category == C_DISTANCE:
        result = []

        if self.find_parent_child_distances in (D_BOTH, D_CENTROID):
            result += [
                "{}_{}".format(FEAT_CENTROID, parent_name)
                for parent_name in self.get_parent_names()
            ]

        if self.find_parent_child_distances in (D_BOTH, D_MINIMUM):
            result += [
                "{}_{}".format(FEAT_MINIMUM, parent_name)
                for parent_name in self.get_parent_names()
            ]

        return result

    return []