code: def FlowAccumFromProps(
    props,
    weights  = None,
    in_place = False
  ):
    
    if type(props) is not rd3array:
      raise Exception("A richdem.rd3array or numpy.ndarray is required!")
  
    if   weights is not None and     in_place:
      accum = rdarray(weights, no_data=-1)
    elif weights is not None and not in_place:
      accum = rdarray(weights, copy=True, meta_obj=props, no_data=-1)
    elif weights is None:
      accum = rdarray(np.ones(shape=props.shape[0:2], dtype='float64'), meta_obj=props, no_data=-1)
    else:
      raise Exception("Execution should never reach this point!")
  
    if accum.dtype!='float64':
      raise Exception("Accumulation array must be of type 'float64'!")
  
    accumw = accum.wrap()
  
    _AddAnalysis(accum, "FlowAccumFromProps(dem, weights={weights}, in_place={in_place})".format(
      weights  = 'None' if weights is None else 'weights',
      in_place = in_place
    ))
  
    _richdem.FlowAccumulation(props.wrap(),accumw)
  
    accum.copyFromWrapped(accumw)
  
    return accum
docs: Calculates flow accumulation from flow proportions.
  
       Args:
           props    (rdarray): An elevation model
           weights  (rdarray): Flow accumulation weights to use. This is the
                               amount of flow generated by each cell. If this is
                               not provided, each cell will generate 1 unit of
                               flow.
           in_place (bool):    If True, then `weights` is modified in place. An
                               accumulation matrix is always returned, but it will
                               just be a view of the modified data if `in_place` 
                               is True.
  
       Returns:
           A flow accumulation array. If `weights` was provided and `in_place` was
           True, then this matrix is a view of the modified data.