MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / mean

Method mean

include/ctranslate2/primitives.h:32–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31 template <typename T>
32 static T mean(const T* array, dim_t size) {
33 return sum(array, size) / size;
34 }
35
36 template <typename T>
37 static dim_t max_element(const T* array, dim_t size);

Callers 1

test_score_apiFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_score_apiFunction · 0.64