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

cumsum intevlindex doesn't work

Open hughesadam87 opened this issue 11 years ago • 1 comments

Cumsum is basically locked to "true" now. The use case that we'd not want this would be if wanted an interval, but instead of cumulative sum (0,5,10) we just have time interval (5,5).

While I think I put the correct logic inplace for cumsum in intvlunit.DateTime as well as intvlindex.IntvlIndex, somewhere it's getting reset.

I tried changing cumsum to an instance attribute instead of a class method, as well as overloading the IntvlIndex.convert method via super, but doesn't seem that the DateTime unit itself is being overwrittin. After convert, the old DateTime and new one occupy same memory address. So where is the reset coming in?

hughesadam87 avatar Aug 28 '14 20:08 hughesadam87

Restructured, and think it should work now, but haven't tested it. It's still a class method, but now on the TimeIndex so easier.

hughesadam87 avatar Sep 04 '14 00:09 hughesadam87