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

Or converted to add, added tests for negative value of scale #1813

merged 1 commit into from Dec 8, 2018


None yet
4 participants

Anipik commented Dec 4, 2018

Fixes #1802

@Anipik Anipik requested review from eerhardt, yaeldekel and tannergooding Dec 4, 2018


This comment has been minimized.


eerhardt commented Dec 4, 2018

Please enable these tests as well since you are fixing this bug:

[Fact(Skip = "Bug 1802:")]
public void VBufferOpScaleBy()
var rgen = RandomUtils.Create(9);
VBuffer<float> a = default;
VBuffer<float> actualDst = default;
VBuffer<float> dst = default;
for (int trial = 0; trial < _trials; ++trial)
float c = ScaleFactor(trial, rgen);
int len = rgen.Next(_maxLen) + 1;
GenerateSingle(rgen, len, out a);
FullCopy(ref a, ref dst);
FullCopy(ref a, ref actualDst);
VectorUtils.ScaleBy(ref actualDst, c);
VBufferUtils.Apply(ref dst, (int i, ref float v) => v *= c);
TestSame(ref dst, ref actualDst, 1e-5);
[Fact(Skip = "Bug 1802:")]
public void VBufferOpScaleByCopy()

@Anipik Anipik force-pushed the Anipik:negativeOr branch from ae25386 to 0c40e04 Dec 4, 2018

@Anipik Anipik force-pushed the Anipik:negativeOr branch from 0c40e04 to 19bd816 Dec 7, 2018


This comment has been minimized.


Anipik commented Dec 8, 2018

@Ivanidzo4ka @eerhardt @TomFinley can you please review this one ?

@Anipik Anipik merged commit 4e8ad35 into dotnet:master Dec 8, 2018

2 checks passed

MachineLearning-CI #20181207.15 succeeded
license/cla All CLA requirements met.

@Anipik Anipik deleted the Anipik:negativeOr branch Dec 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment