darsia.ones_like#

ones_like(image, mode='shape', dtype=None)[source]#

Analog of np.ones_like but for darsia.Image objects.

Parameters:
imagedarsia.Image

Input image.

modeLiteral[“shape”, “voxels”], optional

Mode of the output image. Defaults to “shape”.

dtypeOptional[StandardDtype], optional

Dtype of the output image. Defaults to None.

Returns:
darsia.Image

Output image.