Identifies sites that lie outside the specified shape

  • network (dict) – The network dictionary. For convenience it is also permissible to just supply an N-by-D array of coordinates.

  • shape (array_like) –

    The shape of the domain beyond which points are considered “outside”. The argument is treated as follows:



    [x, y, z]

    A 3D cubic domain of dimension x, y and z with the origin at [0, 0, 0].

    [x, y, 0]

    A 2D square domain of size x by y with the origin at [0, 0]

    [r, z]

    A 3D cylindrical domain of radius r and height z whose central axis starts at [0, 0, 0]

    [r, 0]

    A 2D circular domain of radius r centered on [0, 0] and extending upwards


    A 3D spherical domain of radius r centered on [0, 0, 0]

  • rtol (scalar or array_like, optional) – Controls how far a node must be from the domain boundary to be considered outside. It is applied as a fraction of the domain size as x[i] > (shape[0] + shape[0]*threshold) or y[i] < (0 - shape[1]*threshold). Discrete threshold values can be given for each axis by supplying a list the same size as shape.


mask – A boolean array with True values indicating nodes that lie outside the domain.

Return type:

boolean ndarray


If the domain is 2D, either a circle or a square, then the z-dimension of shape should be set to 0.