File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -29,19 +29,19 @@ public fun <T : Number?> DataColumn<T>.cumSum(skipNA: Boolean = defaultCumSumSki
2929
3030 typeOf<Int >() -> cast<Int >().cumSum().cast()
3131
32- // TODO cumSum for Byte returns Int but is cast back to T: Byte
33- typeOf<Byte >() -> cast<Byte >().cumSum().cast()
32+ // TODO cumSum for Byte returns Int but is converted back to T: Byte
33+ typeOf<Byte >() -> cast<Byte >().cumSum().map { it.toByte() }. cast()
3434
35- // TODO cumSum for Short returns Int but is cast back to T: Short
36- typeOf<Short >() -> cast<Short >().cumSum().cast()
35+ // TODO cumSum for Short returns Int but is converted back to T: Short
36+ typeOf<Short >() -> cast<Short >().cumSum().map { it.toShort() }. cast()
3737
3838 typeOf<Int ?>() -> cast<Int ?>().cumSum(skipNA).cast()
3939
40- // TODO cumSum for Byte? returns Int? but is cast back to T: Byte?
41- typeOf<Byte ?>() -> cast<Byte ?>().cumSum(skipNA).cast()
40+ // TODO cumSum for Byte? returns Int? but is converted back to T: Byte?
41+ typeOf<Byte ?>() -> cast<Byte ?>().cumSum(skipNA).map { it?.toByte() }. cast()
4242
43- // TODO cumSum for Short? returns Int? but is cast back to T: Short?
44- typeOf<Short ?>() -> cast<Short ?>().cumSum(skipNA).cast()
43+ // TODO cumSum for Short? returns Int? but is converted back to T: Short?
44+ typeOf<Short ?>() -> cast<Short ?>().cumSum(skipNA).map { it?.toShort() }. cast()
4545
4646 typeOf<Long >() -> cast<Long >().cumSum().cast()
4747
You can’t perform that action at this time.
0 commit comments