darsia.make_voxel_center#

make_voxel_center(pts, matrix_indexing=True)[source]#

Quick-access constructor for VoxelCenter or VoxelCenterArray.

Parameters:
ptsUnion[list, np.ndarray]

List of points or array of points.

matrix_indexingbool, optional

Whether to use matrix indexing (first index corresponds to row, second to column, third to depth). Defaults to True.

Returns:
Union[VoxelCenter, VoxelCenterArray]

VoxelCenter or VoxelCenterArray variant of point (type depends on input), i.e. if a single point is provided, a VoxelCenter is returned, if a list of points is provided, a VoxelCenterArray is returned.