str2d.hole

str2d.hole(radius, height, width, char='*')[source]

Create a hole. This is a special application of the region function. The function that determines the hole is lambda x, y: x**2 + y**2 <= radius**2.

Parameters:
  • radius (float) – The radius of the hole.

  • height (int) – The number of rows.

  • width (int) – The number of columns.

  • char (str, optional) – The character to use, by default ‘*’.

Returns:

A new Str2D object with the hole.

Return type:

Str2D

See also

region

Create a mask where func is True.

Str2D.hole

Create a hole.