mrpro.utils

Functions

broadcast_right(*x)

Broadcasting on the right.

fill_range_(tensor, dim)

Fill tensor in-place along a specified dimension with increasing integers.

reduce_view(x[, dim])

Reduce expanded dimensions in a view to singletons.

remove_repeat(tensor, tol)

Replace dimensions with all equal values with singletons.

smap(function, tensor[, passed_dimensions])

Apply a function to a tensor serially along multiple dimensions.

split_idx(idx, np_per_block[, np_overlap, ...])

Split a tensor of indices into different blocks.

unsqueeze_left(x, n)

Unsqueze multiple times in the leftmost dimension.

unsqueeze_right(x, n)

Unsqueeze multiple times in the rightmost dimension.

zero_pad_or_crop(data, new_shape[, dim])

Change shape of data by center cropping or symmetric zero-padding.

Modules

slice_profiles

Slice Profiles.

typing

Some type hints that are used in multiple places in the codebase but not part of mrpro's public API.

unit_conversion

Conversion between different units.