gigablochs.utils.expand_dims_to#
- gigablochs.utils.expand_dims_to(arr1, arr2, dimodifier=0, collapse_matching=False)[source]#
Expand dimensions of arr1 to be broadcastable with arr2.
- Parameters:
arr1 (ndarray) – Array to expand after the last axis.
arr2 (ndarray) – Array to match dimensions.
dimodifier (int, optional) – Number of manual extra dimensions to expand. Default is 0.
- Returns:
Array with dimensions expanded.
- Return type:
ndarray