# Buggy code
def resized_shape(self, image, workspace):
    image_pixels = image.pixel_data

    shape = numpy.array(image_pixels.shape).astype(numpy.float)

    if self.size_method.value == R_BY_FACTOR:
        factor = self.resizing_factor.value

        if image.volumetric:
            height, width = shape[1:3]
        else:
            height, width = shape[:2]

        height *= factor

        width *= factor
    else:
        if self.use_manual_or_image.value == C_MANUAL:
            height = self.specific_height.value
            width = self.specific_width.value
        else:
            other_image = workspace.image_set.get_image(self.specific_image.value)

            if image.volumetric:
                height, width = other_image.pixel_data.shape[1:3]
            else:
                height, width = other_image.pixel_data.shape[:2]

    new_shape = []

    if image.volumetric:
        new_shape += [shape[0]]

    new_shape += [height, width]

    if image.multichannel:
        new_shape += [shape[-1]]

    return numpy.asarray(new_shape)


# Traceback (ValueError)
Failed to run module Resize
Traceback (most recent call last):
File "/Users/mcquin/code/CellProfiler/CellProfiler/cellprofiler/gui/pipelinecontroller.py", line 2883, in do_step
self.__pipeline.run_module(module, workspace)
File "/Users/mcquin/code/CellProfiler/CellProfiler/cellprofiler/pipeline.py", line 2011, in run_module
module.run(workspace)
File "/Users/mcquin/code/CellProfiler/CellProfiler/cellprofiler/modules/resize.py", line 233, in run
self.apply_resize(workspace, self.x_name.value, self.y_name.value)
File "/Users/mcquin/code/CellProfiler/CellProfiler/cellprofiler/modules/resize.py", line 311, in apply_resize
mode="symmetric"
File "/usr/local/lib/python2.7/site-packages/skimage/transform/_warps.py", line 135, in resize
preserve_range=preserve_range)
File "/usr/local/lib/python2.7/site-packages/skimage/transform/_warps.py", line 729, in warp
output_shape = safe_as_int(output_shape)
File "/usr/local/lib/python2.7/site-packages/skimage/_shared/utils.py", line 151, in safe_as_int
"{0}, check inputs.".format(val))
ValueError: Integer argument required but received [ 49.75  49.75], check inputs.

# Fixed code
def resized_shape(self, image, workspace):
    image_pixels = image.pixel_data

    shape = numpy.array(image_pixels.shape).astype(numpy.float)

    if self.size_method.value == R_BY_FACTOR:
        factor = self.resizing_factor.value

        if image.volumetric:
            height, width = shape[1:3]
        else:
            height, width = shape[:2]

        height = numpy.round(height * factor)

        width = numpy.round(width * factor)
    else:
        if self.use_manual_or_image.value == C_MANUAL:
            height = self.specific_height.value
            width = self.specific_width.value
        else:
            other_image = workspace.image_set.get_image(self.specific_image.value)

            if image.volumetric:
                height, width = other_image.pixel_data.shape[1:3]
            else:
                height, width = other_image.pixel_data.shape[:2]

    new_shape = []

    if image.volumetric:
        new_shape += [shape[0]]

    new_shape += [height, width]

    if image.multichannel:
        new_shape += [shape[-1]]

    return numpy.asarray(new_shape)