Code Duplication    Length = 13-13 lines in 2 locations

pyspectral/blackbody.py 2 locations

@@ 229-241 (lines=13) @@
226
227
228
    Output: The spectral radiance per meter (not micron!)
229
            Unit = W/m^2 sr^-1 m^-1
230
    """
231
232
    return planck(wavel, temp, wavelength=True)
233
@@ 102-114 (lines=13) @@
99
    shape = rad.shape
100
    resshape = res.shape
101
102
    if wavnum.shape[0] == 1:
103
        if rad.shape[0] == 1:
104
            return res[0]
105
        else:
106
            return res[::].reshape(shape)
107
    else:
108
        if rad.shape[0] == 1:
109
            return res[0, :]
110
        else:
111
            if len(shape) == 1:
112
                return np.reshape(res, (shape[0], resshape[1]))
113
            else:
114
                return np.reshape(res, (shape[0], shape[1], resshape[1]))
115
116
117
def planck(wave, temp, wavelength=True):