Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/871#discussion_r34131445
  
    --- Diff: 
flink-staging/flink-ml/src/main/scala/org/apache/flink/ml/package.scala ---
    @@ -70,6 +70,15 @@ package object ml {
           dataSet.map(new BroadcastSingleElementMapperWithIteration[T, B, 
O](dataSet.clean(fun)))
             .withBroadcastSet(broadcastVariable, "broadcastVariable")
         }
    +
    +    /** Calculates the mean value of a DataSet[T <\: Numeric[T]]
    +      *
    +      * @return A DataSet[Double] with the mean value as its only element
    +      */
    +    def mean()(implicit num: Numeric[T], ttit: TypeInformation[(T, Int)]): 
DataSet[Double] =
    --- End diff --
    
    I think this method should be placed in a `NumericRichDataSet[T: Numeric]` 
class. Otherwise we provide a `mean` method for `DataSets` whose element type 
does not support this operation. This might be misleading IMO.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to