roll_dict

roll_dict#

stimupy.utils.roll_dict(dct, shift, axes, keys=('img', '*mask'))#

Return a dict with key-arrays rolled by shift in axes.

Parameters:
  • dct (dict) – dict containing arrays to be stacked

  • shift (int) – number of pixels by which to shift

  • axes (Number or Sequence[Number, ...]) – axes in which to shift

  • keys (Sequence[String, String] or String) – keys in dict for images to be padded

Returns:

same as input dict but with rolled key-arrays

Return type:

dict[str, Any]