pierogis.ingredients.dish module

class pierogis.ingredients.dish.Dish(opacity: int = 100, mask: Optional[numpy.ndarray] = None, **kwargs)[source]

Bases: pierogis.ingredients.ingredient.Ingredient

cook a pierogi with a recipe

cook(pixels: numpy.ndarray) numpy.ndarray[source]

performs actions on a pixel array and returns a cooked array

prep(pierogi: pierogis.ingredients.pierogi.Pierogi, recipe: Optional[pierogis.ingredients.recipe.Recipe] = None, **kwargs)[source]

set the recipe to cook for this dish

Parameters
  • recipe – something callable that returns a cook(pixels) method. Any Ingredient (including Recipe) is an example of this

  • pierogis – a list of Pierogi to cook

serve() pierogis.ingredients.dish.Dish[source]

cook the recipe and set the output to this object’s pixel array