random#

random(network, seed=None, num_range=[0, 1])[source]#

Adopt a value based on the values in neighboring pores

Parameters:
  • target (Base) – The object which this model is associated with. This controls the length of the calculated array, and also provides access to other necessary properties.

  • prop (str) – The dictionary key to the array containing the pore property to be used in the calculation.

  • mode (str) –

    Controls how the pore property is calculated. The default value is ‘min’. Options are:

    mode

    meaning

    ’min’

    Returns the value of the minimum property of the neighboring pores

    ’max’

    Returns the value of the maximum property of the neighboring pores

    ’mean’

    Returns the value of the mean property of the neighboring pores

    ’sum’

    Returns the sum of the property of the neighrboring pores

  • ignore_nans (bool (default is True)) – If True the result will ignore nans in the neighbors

Returns:

value – Array containing customized values based on those of adjacent pores.

Return type:

ndarray