def op_abs_mul(lin_op, args):
 if (lin_op.type in [lo.SCALAR_CONST, lo.DENSE_CONST, lo.SPARSE_CONST]):
  result = np.abs(lin_op.data)
 elif (lin_op.type is lo.NEG):
  result = args[0]
 elif (lin_op.type is lo.MUL):
  coeff = mul(lin_op.data, {}, True)
  result = (coeff * args[0])
 elif (lin_op.type is lo.DIV):
  divisor = mul(lin_op.data, {}, True)
  result = (args[0] / divisor)
 elif (lin_op.type is lo.CONV):
  result = conv_mul(lin_op, args[0], is_abs=True)
 else:
  result = op_mul(lin_op, args)
 return result

def op_abs_mul ( lin_op , args ) : if ( lin_op . type in [ lo . SCALAR_CONST , lo . DENSE_CONST , lo . SPARSE_CONST ] ) : result = np . abs ( lin_op . data ) elif ( lin_op . type is lo . NEG ) : result = args [ 0 ] elif ( lin_op . type is lo . MUL ) : coeff = mul ( lin_op . data , { } , True ) result = ( coeff * args [ 0 ] ) elif ( lin_op . type is lo . DIV ) : divisor = mul ( lin_op . data , { } , True ) result = ( args [ 0 ] / divisor ) elif ( lin_op . type is lo . CONV ) : result = conv_mul ( lin_op , args [ 0 ] , is_abs = True ) else : result = op_mul ( lin_op , args ) return result
applies the absolute value of the linear operator to the arguments .