#NEWLINE# def minpore( network , geometry , factor = 1 , **kwargs ) : #NEWLINE# #INDENT# '\n    Assign the throat diameter to be equal to the smallest connecting pore\n    diameter. If zero (in case of boundaries) take it to be the maximum of\n    the connecting pore diameters\n\n    Parameters\n    ----------\n    factor : float < 1\n        A factor between 0 and 1 to further constrict the throat size\n        calculcated by the function.\n\n    ' #NEWLINE# gTs = geometry . throats ( ) #NEWLINE# nTs = geometry . map_throats ( network , gTs ) #NEWLINE# pDs = geometry [ 'pore.diameter' ] [ network [ 'throat.conns' ] [ nTs ] ] #NEWLINE# value = ( _sp . amin ( pDs , axis = 1 ) * factor ) #NEWLINE# value [ ( value == 0.0 ) ] = _sp . amax ( pDs , axis = 1 ) [ ( value == 0.0 ) ] #NEWLINE# return value