File tree 1 file changed +8
-8
lines changed
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api
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
29
29
30
30
typeOf<Int >() -> cast<Int >().cumSum().cast()
31
31
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()
34
34
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()
37
37
38
38
typeOf<Int ?>() -> cast<Int ?>().cumSum(skipNA).cast()
39
39
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()
42
42
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()
45
45
46
46
typeOf<Long >() -> cast<Long >().cumSum().cast()
47
47
You can’t perform that action at this time.
0 commit comments