philipce / nifty

Numerical computing in Swift – for Linux and macOS
Apache License 2.0
105 stars 18 forks source link

Added implementation of Vector and Matrix means with tests #13

Closed nbertagnolli closed 7 years ago

nbertagnolli commented 7 years ago

Should the mean function always return a Matrix in row form or should I try and mimic Matlab and make it return a column of means when the mean is taken across rows?

For example should mean([[1, 2, 3], [4, 5, 6]]) return [[2.0, 5.0]] and [[2.5, 3.5, 4.5]] or [2.0, 5.0]] and [[2.5], [3.5], [4.5]]

codecov-io commented 7 years ago

Codecov Report

Merging #13 into master will increase coverage by 0.12%. The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #13      +/-   ##
==========================================
+ Coverage   88.96%   89.08%   +0.12%     
==========================================
  Files         196      196              
  Lines        3879     3922      +43     
==========================================
+ Hits         3451     3494      +43     
  Misses        428      428
Impacted Files Coverage Δ
Sources/mean.swift 100% <100%> (ø) :white_check_mark:
Tests/NiftyTests/mean_test.swift 100% <100%> (ø) :white_check_mark:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0d03643...3615d7a. Read the comment docs.