fslaborg / FSharp.Stats

statistical testing, linear algebra, machine learning, fitting and signal processing in F#
https://fslab.org/FSharp.Stats/
Other
205 stars 54 forks source link

Addition of Vector.linspace #251

Closed bvenn closed 1 year ago

bvenn commented 1 year ago

Fixes #235

Please list the changes introduced in this PR

Description

I've added Vector.linspace as discussed in #235.

Note: If no sequence length is defined, numpy uses 50 as default. I thought it would be more intuitive, if the stepsize is set to 1.0 if no length is defined.

[Required] please make sure you checked that

[Optional]

codecov-commenter commented 1 year ago

Codecov Report

Merging #251 (39e31c0) into developer (6bf2e74) will increase coverage by 0.01%. The diff coverage is 44.82%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@              Coverage Diff              @@
##           developer     #251      +/-   ##
=============================================
+ Coverage      45.00%   45.01%   +0.01%     
=============================================
  Files            148      148              
  Lines          14479    14532      +53     
  Branches        1923     1930       +7     
=============================================
+ Hits            6516     6542      +26     
- Misses          7433     7460      +27     
  Partials         530      530              
Impacted Files Coverage Δ
src/FSharp.Stats/List.fs 0.00% <0.00%> (ø)
src/FSharp.Stats/ML/Unsupervised/DbScan.fs 0.00% <0.00%> (ø)
src/FSharp.Stats/Seq.fs 0.78% <0.00%> (-0.04%) :arrow_down:
src/FSharp.Stats/Vector.fs 15.07% <0.00%> (-0.31%) :arrow_down:
tests/FSharp.Stats.Tests/Main.fs 0.00% <0.00%> (ø)
src/FSharp.Stats/Array.fs 3.82% <80.00%> (+2.50%) :arrow_up:
tests/FSharp.Stats.Tests/Array.fs 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

bvenn commented 1 year ago

According to VectorExtension, I moved the types into SeqExtension, ListExtension, and ArrayExtension respectively. Because of AutoOpen tags the usage is not changed, but this should enable duplicates of function/member names if necessary.