scikit-spectra icon indicating copy to clipboard operation
scikit-spectra copied to clipboard

Should methods that return series return timespectra just like slicing?

Open hughesadam87 opened this issue 11 years ago • 0 comments

Noticed that methods like np.cov() will return a series of values given a timespectra (timeseries actually). Seems like the place to fix this would be in _dfgetattr in TimeSpectra.

Tried putting this in before hte if isintance(out, DataFrame) line:

    ### If operation returns a dataframe, return new TimeSpectra
    if isinstance(out, Series) or isinstance(out, TimeSeries):
        out=DataFrame(out)        

Caused some errors that I didn't look into, but I think it might not work just cuz some instances of series are necessary. Like storing the references and dark spectra and such.

hughesadam87 avatar Apr 19 '13 16:04 hughesadam87