

def _set_array_name(self, filter):
    if ((len(self.inputs) == 0) or (len(self.inputs[0].outputs) == 0)):
        return
    o = filter.output
    pd = o.point_data
    ps = pd.scalars
    cd = o.cell_data
    cs = cd.scalars
    if ((ps is not None) and (not ps.name)):
        ps.name = (pd.vectors.name + ' magnitude')
    elif ((cs is not None) and (not cs.name)):
        cs.name = (cd.vectors.name + ' magnitude')

dataset/ETHPy150Open enthought/mayavi/mayavi/filters/extract_vector_norm.py ExtractVectorNorm._set_array_name/original