piper.decorators.shape

piper.decorators.shape(trigger='after', keyword='shape', debug=False)[source]

Shape decorator - Experimental

Shape decorator allows reporting of shape (rows, cols) info within a decorated function.

If the decorated function has a keyword ‘shape’ specified then the shape functionality is triggered. The shape function can be invoked before or after the decorated function using the trigger parameter.

Parameters
  • trigger – trigger action before or after decorated function invoked.

  • keyword – default ‘shape’. keyword to trigger the decorated action/event.

  • debug – default False. True shows decorated arguments and keyword args.