-
Notifications
You must be signed in to change notification settings - Fork 73
Remove public statistical extensions for Iterable
#1065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/math/median.kt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! just some small things. The TC build seems to fail, but I'm not sure why. Probably a rebuild fixes it
@@ -45,7 +45,7 @@ public fun AnyRow.rowMedianOrNull(): Any? = | |||
|
|||
public fun AnyRow.rowMedian(): Any = rowMedianOrNull().suggestIfNull("rowMedian") | |||
|
|||
public inline fun <reified T : Comparable<T>> AnyRow.rowMedianOfOrNull(): T? = valuesOf<T>().medianOrNull() | |||
public inline fun <reified T : Comparable<T>> AnyRow.rowMedianOfOrNull(): T? = valuesOf<T>().median() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why'd you change these? seems unsafe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because old medianOrNull()
was removed. It called basically this median()
- internal implementation, not public median
(which was also removed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah then maybe you could rename median()
to medianOrNull()
, since that's what it does, right?
@@ -53,7 +53,7 @@ public fun AnyRow.rowPercentile(percentile: Double): Any = | |||
rowPercentileOrNull(percentile).suggestIfNull("rowPercentile") | |||
|
|||
public inline fun <reified T : Comparable<T>> AnyRow.rowPercentileOfOrNull(percentile: Double): T? = | |||
valuesOf<T>().percentileOrNull(percentile) | |||
valuesOf<T>().percentile(percentile) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
Part of #961.