mango.ones

mango.ones(shape, dtype=None, mtype=None, halo=(0, 0, 0), mpidims=(0, 0, 0), origin=(0, 0, 0))

Creates an one-initialised Dds object of specified global size.

Parameters:
  • shape (3-sequence) – Three element sequence indicating the global shape of the array e.g. (zSz, ySz, xSz).
  • dtype (scipy.dtype) – The data-type of the Dds elements, one of: ‘complex128’, ‘complex64’, ‘float16’, ‘float32’, ‘float64’, ‘int16’, ‘int32’, ‘int64’, ‘int8’, ‘uint16’, ‘uint32’, ‘uint64’, ‘uint8’.
  • mtype (mango.mtype) – The mango image mtype of the Dds, one of: ‘Distance_Map_Data’, ‘dist’, ‘distance_map’, ‘Float16_Data’, ‘f16’, ‘float16’, ‘Float64_Data’, ‘f64’, ‘float64’, ‘Label_Data’, ‘labels’, ‘Medial_Axis_Data’, ‘medax’, ‘medial_axis’, ‘Medial_Axis_UChar_Data’, ‘medax’, ‘medial_axis’, ‘Projection_Float_Data’, ‘projf32’, ‘Projection_U16_Data’, ‘proju16’, ‘Rgba8_Data’, ‘rgba8’, ‘Segmented_Data’, ‘seg’, ‘segmented’, ‘Tomographic_Data’, ‘tom’, ‘tomo’, ‘Tomographic_Float_Data’, ‘tom’, ‘tomo_float’.
  • halo (3-sequence or int) – The number of voxels added as a layer around each MPI-subdomain.
  • mpidims (3-sequence) – The shape of the cartesian MPI process layout.
  • origin (3-sequence) – The global indexing origin for the Dds array.
Return type:

Dds

Returns:

Dds with array elements initialised to one.

Previous topic

mango.zeros_like

Next topic

mango.ones_like

This Page