217 references to Repeat
CSharpSyntaxGenerator (1)
Grammar\GrammarGenerator.cs (1)
271
=> Enumerable.
Repeat
(production, count);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Logging\AcceptanceTests.cs (2)
77
new("test", Enumerable.
Repeat
("test", 10000).ToArray())
938
new("test", Enumerable.
Repeat
("test", 10000).ToArray())
Microsoft.Build (1)
Evaluation\ItemSpec.cs (1)
487
return Enumerable.
Repeat
(EscapingUtilities.UnescapeAll(TextFragment), 1);
Microsoft.CodeAnalysis.CSharp (1)
BoundTree\UnboundLambda.cs (1)
188
parameterRefKinds.IsDefault ? Enumerable.
Repeat
(RefKind.None, parameterTypes.Length).ToImmutableArray() : parameterRefKinds,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
99
[.. Enumerable.
Repeat
<ExpressionSyntax>(OmittedArraySizeExpression(), arrayType.Rank)]));
204
? Enumerable.
Repeat
((TypeSyntax)OmittedTypeArgument(), symbol.TypeArguments.Length)
Microsoft.CodeAnalysis.CSharp.Features (1)
GenerateType\CSharpGenerateTypeService.cs (1)
476
: Enumerable.
Repeat
<SyntaxNode>(null, state.SimpleName.Arity);
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\Runtime\CSharpForwardCancellationTokenToInvocationsFixer.TypeNameVisitor.cs (1)
142
? Enumerable.
Repeat
((TypeSyntax)OmittedTypeArgument(), symbol.TypeArguments.Length)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
99
[.. Enumerable.
Repeat
<ExpressionSyntax>(OmittedArraySizeExpression(), arrayType.Rank)]));
204
? Enumerable.
Repeat
((TypeSyntax)OmittedTypeArgument(), symbol.TypeArguments.Length)
Microsoft.Data.Analysis.Tests (21)
ArrowIntegrationTests.cs (19)
49
.Append("DoubleColumn", false, new DoubleArray.Builder().AppendRange(Enumerable.
Repeat
(1.0, 10)).Build())
50
.Append("FloatColumn", false, new FloatArray.Builder().AppendRange(Enumerable.
Repeat
(1.0f, 10)).Build())
51
.Append("ShortColumn", false, new Int16Array.Builder().AppendRange(Enumerable.
Repeat
((short)1, 10)).Build())
52
.Append("LongColumn", false, new Int64Array.Builder().AppendRange(Enumerable.
Repeat
((long)1, 10)).Build())
53
.Append("UIntColumn", false, new UInt32Array.Builder().AppendRange(Enumerable.
Repeat
((uint)1, 10)).Build())
54
.Append("UShortColumn", false, new UInt16Array.Builder().AppendRange(Enumerable.
Repeat
((ushort)1, 10)).Build())
55
.Append("ULongColumn", false, new UInt64Array.Builder().AppendRange(Enumerable.
Repeat
((ulong)1, 10)).Build())
56
.Append("ByteColumn", false, new Int8Array.Builder().AppendRange(Enumerable.
Repeat
((sbyte)1, 10)).Build())
57
.Append("UByteColumn", false, new UInt8Array.Builder().AppendRange(Enumerable.
Repeat
((byte)1, 10)).Build())
58
.Append("Date64Column", false, new Date64Array.Builder().AppendRange(Enumerable.
Repeat
(DateTime.Now, 10)).Build())
100
.Append(prependColumnNamesWith + "DoubleColumn", false, new DoubleArray.Builder().AppendRange(Enumerable.
Repeat
(1.0, 10)).Build())
101
.Append(prependColumnNamesWith + "FloatColumn", false, new FloatArray.Builder().AppendRange(Enumerable.
Repeat
(1.0f, 10)).Build())
102
.Append(prependColumnNamesWith + "ShortColumn", false, new Int16Array.Builder().AppendRange(Enumerable.
Repeat
((short)1, 10)).Build())
103
.Append(prependColumnNamesWith + "LongColumn", false, new Int64Array.Builder().AppendRange(Enumerable.
Repeat
((long)1, 10)).Build())
104
.Append(prependColumnNamesWith + "UIntColumn", false, new UInt32Array.Builder().AppendRange(Enumerable.
Repeat
((uint)1, 10)).Build())
105
.Append(prependColumnNamesWith + "UShortColumn", false, new UInt16Array.Builder().AppendRange(Enumerable.
Repeat
((ushort)1, 10)).Build())
106
.Append(prependColumnNamesWith + "ULongColumn", false, new UInt64Array.Builder().AppendRange(Enumerable.
Repeat
((ulong)1, 10)).Build())
107
.Append(prependColumnNamesWith + "ByteColumn", false, new Int8Array.Builder().AppendRange(Enumerable.
Repeat
((sbyte)1, 10)).Build())
108
.Append(prependColumnNamesWith + "UByteColumn", false, new UInt8Array.Builder().AppendRange(Enumerable.
Repeat
((byte)1, 10)).Build())
DataFrameTests.Utils.cs (1)
79
var buffers = Enumerable.
Repeat
(new VBuffer<int>(5, new[] { 0, 1, 2, 3, 4 }), length).ToArray();
VBufferColumnTests.cs (1)
28
var buffers = Enumerable.
Repeat
(new VBuffer<int>(5, new[] { 0, 1, 2, 3, 4 }), 10).ToArray();
Microsoft.Extensions.AI.Abstractions.Tests (2)
test\Shared\JsonSchemaExporter\TestTypes.cs (2)
1119
public IEnumerator<int> GetEnumerator() => Enumerable.
Repeat
(BaseValue, 1).GetEnumerator();
1131
public IEnumerator<KeyValuePair<string, int>> GetEnumerator() => Enumerable.
Repeat
(new KeyValuePair<string, int>(nameof(BaseValue), BaseValue), 1).GetEnumerator();
Microsoft.Extensions.AI.Evaluation.NLP.Tests (20)
BLEUAlgorithmTests.cs (20)
79
[.. Enumerable.
Repeat
("a", 11)],
80
[.. Enumerable.
Repeat
("a", 8)],
82
string[] hypothesis = [.. Enumerable.
Repeat
("a", 7)];
89
[.. Enumerable.
Repeat
("a", 11)],
90
[.. Enumerable.
Repeat
("a", 8)],
91
[.. Enumerable.
Repeat
("a", 6)],
92
[.. Enumerable.
Repeat
("a", 7)],
94
hypothesis = [.. Enumerable.
Repeat
("a", 7)];
101
[.. Enumerable.
Repeat
("a", 28)],
102
[.. Enumerable.
Repeat
("a", 28)],
104
hypothesis = [.. Enumerable.
Repeat
("a", 12)];
111
[.. Enumerable.
Repeat
("a", 13)],
112
[.. Enumerable.
Repeat
("a", 2)],
114
hypothesis = [.. Enumerable.
Repeat
("a", 12)];
121
[.. Enumerable.
Repeat
("a", 13)],
122
[.. Enumerable.
Repeat
("a", 11)],
124
hypothesis = [.. Enumerable.
Repeat
("a", 12)];
131
[.. Enumerable.
Repeat
("a", 11)],
132
[.. Enumerable.
Repeat
("a", 13)],
134
hypothesis = [.. Enumerable.
Repeat
("a", 12)];
Microsoft.Extensions.AI.Evaluation.Safety (1)
ContentSafetyServicePayloadUtilities.cs (1)
557
normalizedPerTurnContext.InsertRange(0, Enumerable.
Repeat
<string?>(null, missingContextCount));
Microsoft.Extensions.AI.Integration.Tests (1)
ToolReductionTests.cs (1)
623
_vector = Enumerable.
Repeat
(1f, dims).ToArray();
Microsoft.Extensions.AI.Tests (2)
Functions\AIFunctionFactoryTest.cs (2)
1001
(int? limit = null, DateTime? from = null) => Enumerable.
Repeat
(from ?? default, limit ?? 4).Select(d => d.Year).ToArray(),
1034
(int? limit = null, DateTime? from = null) => Enumerable.
Repeat
(from ?? default, limit ?? 4).Select(d => d.Year).ToArray(),
Microsoft.Extensions.DataIngestion.Tests (3)
Chunkers\NoOverlapTokenChunkerTests.cs (2)
23
string text = string.Join(" ", Enumerable.
Repeat
("word", 600)); // each word is 1 token
43
string text = string.Join(" ", Enumerable.
Repeat
("word", 1500)); // each word is 1 token
Chunkers\SectionChunkerTests.cs (1)
146
string text = string.Join(" ", Enumerable.
Repeat
("word", 600)); // each word is 1 token
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\Internal\RandomStringGenerator.cs (1)
19
.
Repeat
(Chars, length)
Microsoft.Extensions.Http.Resilience.PerformanceTests (2)
HttpClientFactory.cs (2)
82
options.Groups = Enumerable.
Repeat
(0, routes).Select(_ =>
105
options.Groups = Enumerable.
Repeat
(0, routes).Select(_ =>
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
Resolver\DnsPrimitivesTests.cs (1)
185
byte[] data = Enumerable.
Repeat
(labelData, 3).SelectMany(x => x).Concat(lastLabelData).Concat(new byte[1]).ToArray();
Microsoft.Maui.Controls (2)
TemplatedItemsList.cs (2)
1004
_templatedObjects.InsertRange(_templatedObjects.Count, Enumerable.
Repeat
<TItem>(null, maxindex - _templatedObjects.Count));
1014
_templatedObjects.InsertRange(e.NewStartingIndex, Enumerable.
Repeat
<TItem>(null, e.NewItems.Count));
Microsoft.Maui.Controls.Build.Tasks (5)
ModuleDefinitionExtensions.cs (5)
52
var ctorKey = $"{type}.ctor({(string.Join(",", Enumerable.
Repeat
("_", paramCount)))})";
58
var ctorKey = $"{type}.ctor({(string.Join(",", Enumerable.
Repeat
("_", paramCount)))})";
64
var ctorKey = $"{type}<{(string.Join(",", classArguments))}>.ctor({(string.Join(",", Enumerable.
Repeat
("_", paramCount)))})";
70
var ctorKey = $"{type}<{string.Join(",", classArguments.Select(SerializeTypeReference))}>.ctor({(string.Join(",", Enumerable.
Repeat
("_", paramCount)))})";
220
var methodKey = $"{(isStatic ? "static " : "")}{type}<{(classArguments == null ? "" : string.Join(",", classArguments))}>.({(string.Join(",", Enumerable.
Repeat
("_", paramCount)))})";
Microsoft.ML.AutoML.Samples (2)
AutoMLExperiment.cs (1)
100
Features = Enumerable.
Repeat
(label, 50)
Sweepable\SweepableLightGBMBinaryExperiment.cs (1)
127
Features = Enumerable.
Repeat
(label, 50)
Microsoft.ML.AutoML.Tests (2)
TunerTests.cs (2)
176
var invalidLosses = Enumerable.
Repeat
(new[] { double.NaN, double.NegativeInfinity, double.PositiveInfinity }, 100)
211
var zeroLosses = Enumerable.
Repeat
(0.0, 100);
Microsoft.ML.Core (1)
Utilities\Utils.cs (1)
844
invMap = Enumerable.
Repeat
(-1, lim).ToArray<int>();
Microsoft.ML.Data (10)
DataView\DataViewExtensions.cs (1)
44
return dv.GetRowCursor(Enumerable.
Repeat
(columnNeeded, 1));
Scorers\FeatureContributionCalculation.cs (1)
361
return Enumerable.
Repeat
(FeatureColumn, 1);
Scorers\SchemaBindablePredictorWrapper.cs (2)
225
return Enumerable.
Repeat
(InputRoleMappedSchema.Feature.Value, 1);
545
return Enumerable.
Repeat
(InputRoleMappedSchema.Feature.Value, 1);
Transforms\NormalizeColumnDbl.cs (3)
702
nodeProtoWrapper.AddAttribute("offset", Enumerable.
Repeat
(Offset, featureCount));
703
nodeProtoWrapper.AddAttribute("scale", Enumerable.
Repeat
(Scale, featureCount));
777
node.AddAttribute("offset", Enumerable.
Repeat
<TFloat>(0, featureCount));
Transforms\NormalizeColumnSng.cs (3)
860
node.AddAttribute("offset", Enumerable.
Repeat
(Offset, featureCount));
861
node.AddAttribute("scale", Enumerable.
Repeat
(Scale, featureCount));
934
node.AddAttribute("offset", Enumerable.
Repeat
<TFloat>(0, featureCount));
Microsoft.ML.Ensemble (2)
PipelineEnsemble.cs (2)
145
var predictorRow = Mappers[i].GetRow(pipelineRow, Enumerable.
Repeat
(Mappers[i].InputSchema[ScoreCols[i]], 1));
186
var inputColumns = Mappers[i].GetDependenciesForNewColumns(Enumerable.
Repeat
(weightCol, 1));
Microsoft.ML.FastTree (22)
Dataset\Dataset.cs (1)
392
var truncatedActiveFeatures = Enumerable.
Repeat
(true, NumFeatures).ToArray();
Dataset\DatasetUtils.cs (1)
56
Enumerable.
Repeat
(uvalToOrder[(uint)qid], skel.Boundaries[i + 1] - skel.Boundaries[i])));
Dataset\Feature.cs (1)
212
: base(DenseIntArray.New(length, IntArrayType.Dense, 0, Enumerable.
Repeat
(0, length)))
GamModelParameters.cs (1)
450
var splitFeatures = Enumerable.
Repeat
(featureIndex, numInternalNodes).ToArray();
Training\RegressionTreeNodeDocuments.cs (1)
54
return Enumerable.
Repeat
(this, 1);
TreeEnsembleFeaturizer.cs (1)
370
return Enumerable.
Repeat
(FeatureColumn, 1);
Utils\RegressionTreeBaseUtils.cs (16)
44
treeWeightsList.AddRange(Enumerable.
Repeat
(treeWeights[i], trees[i].NumberOfNodes + trees[i].NumberOfLeaves));
47
treeId.AddRange(Enumerable.
Repeat
(i, trees[i].NumberOfNodes + trees[i].NumberOfLeaves));
50
isLeaf.AddRange(Enumerable.
Repeat
(new ReadOnlyMemory<char>("Tree node".ToCharArray()), trees[i].NumberOfNodes));
51
isLeaf.AddRange(Enumerable.
Repeat
(new ReadOnlyMemory<char>("Leaf node".ToCharArray()), trees[i].NumberOfLeaves));
55
leftChild.AddRange(Enumerable.
Repeat
(0, trees[i].NumberOfLeaves));
59
rightChild.AddRange(Enumerable.
Repeat
(0, trees[i].NumberOfLeaves));
63
numericalSplitFeatureIndexes.AddRange(Enumerable.
Repeat
(0, trees[i].NumberOfLeaves));
67
numericalSplitThresholds.AddRange(Enumerable.
Repeat
(0f, trees[i].NumberOfLeaves));
71
categoricalSplitFlags.AddRange(Enumerable.
Repeat
(false, trees[i].NumberOfLeaves));
74
leafValues.AddRange(Enumerable.
Repeat
(0d, trees[i].NumberOfNodes));
79
splitGains.AddRange(Enumerable.
Repeat
(0d, trees[i].NumberOfLeaves));
94
categoricalSplitFeatures.AddRange(Enumerable.
Repeat
(new VBuffer<int>(), trees[i].NumberOfLeaves));
95
categoricalCategoricalSplitFeatureRange.AddRange(Enumerable.
Repeat
(new VBuffer<int>(), trees[i].NumberOfLeaves));
99
builder.AddColumn("Bias", NumberDataViewType.Double, Enumerable.
Repeat
(bias, numberOfRows).ToArray());
124
leafSamples.AddRange(Enumerable.
Repeat
(new VBuffer<double>(), quantileTrees[i].NumberOfNodes));
125
leafSampleWeights.AddRange(Enumerable.
Repeat
(new VBuffer<double>(), quantileTrees[i].NumberOfNodes));
Microsoft.ML.GenAI.Core (2)
Trainer\CausalLMDataset.cs (2)
90
var label = Enumerable.
Repeat
(-100L, train.Length).Concat([labelIds[i]]).Skip(1).ToArray();
91
var mask = Enumerable.
Repeat
(1L, train.Length).ToArray();
Microsoft.ML.GenAI.Mistral (1)
MistralCausalLMAgent.cs (1)
163
return new string(Enumerable.
Repeat
(chars, length)
Microsoft.ML.Samples (70)
Dynamic\Trainers\BinaryClassification\AveragedPerceptron.cs (1)
99
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\AveragedPerceptronWithOptions.cs (1)
110
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\FactorizationMachine.cs (1)
107
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\FastForest.cs (1)
102
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\FastForestWithOptions.cs (1)
114
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\FastTree.cs (1)
105
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\FastTreeWithOptions.cs (1)
117
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\LbfgsLogisticRegression.cs (1)
102
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\LbfgsLogisticRegressionWithOptions.cs (1)
111
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\LdSvm.cs (1)
99
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\LdSvmWithOptions.cs (1)
108
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\LightGbm.cs (1)
102
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\LightGbmWithOptions.cs (1)
113
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\LinearSvm.cs (1)
99
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\LinearSvmWithOptions.cs (1)
108
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\PriorTrainer.cs (1)
99
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\SdcaLogisticRegression.cs (1)
107
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\SdcaLogisticRegressionWithOptions.cs (1)
119
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\SdcaNonCalibrated.cs (1)
106
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\SdcaNonCalibratedWithOptions.cs (1)
121
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\SgdCalibrated.cs (1)
99
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\SgdCalibratedWithOptions.cs (1)
111
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\SgdNonCalibrated.cs (1)
99
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\SgdNonCalibratedWithOptions.cs (1)
108
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\SymbolicSgdLogisticRegression.cs (1)
102
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\BinaryClassification\SymbolicSgdLogisticRegressionWithOptions.cs (1)
111
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\Clustering\KMeans.cs (1)
106
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\Clustering\KMeansWithOptions.cs (1)
114
Features = Enumerable.
Repeat
(label, 50)
Dynamic\Trainers\MulticlassClassification\LbfgsMaximumEntropy.cs (1)
104
Features = Enumerable.
Repeat
(label, 20)
Dynamic\Trainers\MulticlassClassification\LbfgsMaximumEntropyWithOptions.cs (1)
112
Features = Enumerable.
Repeat
(label, 20)
Dynamic\Trainers\MulticlassClassification\LightGbm.cs (1)
107
Features = Enumerable.
Repeat
(label, 20)
Dynamic\Trainers\MulticlassClassification\LightGbmWithOptions.cs (1)
117
Features = Enumerable.
Repeat
(label, 20)
Dynamic\Trainers\MulticlassClassification\LogLossPerClass.cs (1)
87
Features = Enumerable.
Repeat
(label, 20)
Dynamic\Trainers\MulticlassClassification\NaiveBayes.cs (1)
112
Features = Enumerable.
Repeat
(label, 20)
Dynamic\Trainers\MulticlassClassification\OneVersusAll.cs (1)
105
Features = Enumerable.
Repeat
(label, 20)
Dynamic\Trainers\MulticlassClassification\PairwiseCoupling.cs (1)
105
Features = Enumerable.
Repeat
(label, 20)
Dynamic\Trainers\MulticlassClassification\SdcaMaximumEntropy.cs (1)
111
Features = Enumerable.
Repeat
(label, 20)
Dynamic\Trainers\MulticlassClassification\SdcaMaximumEntropyWithOptions.cs (1)
121
Features = Enumerable.
Repeat
(label, 20)
Dynamic\Trainers\MulticlassClassification\SdcaNonCalibrated.cs (1)
112
Features = Enumerable.
Repeat
(label, 20)
Dynamic\Trainers\MulticlassClassification\SdcaNonCalibratedWithOptions.cs (1)
121
Features = Enumerable.
Repeat
(label, 20)
Dynamic\Trainers\Ranking\FastTree.cs (1)
86
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Ranking\FastTreeWithOptions.cs (1)
100
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Ranking\LightGbm.cs (1)
86
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Ranking\LightGbmWithOptions.cs (1)
101
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\FastForest.cs (1)
83
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\FastForestWithOptions.cs (1)
96
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\FastTree.cs (1)
83
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\FastTreeTweedie.cs (1)
83
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\FastTreeTweedieWithOptions.cs (1)
98
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\FastTreeWithOptions.cs (1)
99
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\Gam.cs (1)
83
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\GamWithOptions.cs (1)
94
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\LbfgsPoissonRegression.cs (1)
81
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\LbfgsPoissonRegressionWithOptions.cs (1)
95
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\LightGbm.cs (1)
84
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\LightGbmWithOptions.cs (1)
103
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\OnlineGradientDescent.cs (1)
72
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\OnlineGradientDescentWithOptions.cs (1)
88
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\OrdinaryLeastSquares.cs (1)
80
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\OrdinaryLeastSquaresWithOptions.cs (1)
92
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\Sdca.cs (1)
80
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Trainers\Regression\SdcaWithOptions.cs (1)
96
Features = Enumerable.
Repeat
(label, 50).Select(
Dynamic\Transforms\ImageAnalytics\ConvertToImage.cs (1)
102
Features = Enumerable.
Repeat
(0,
Dynamic\Transforms\TreeFeaturization\FastForestBinaryFeaturizationWithOptions.cs (1)
136
Features = Enumerable.
Repeat
(label, 3).Select(x => x ?
Dynamic\Transforms\TreeFeaturization\FastForestRegressionFeaturizationWithOptions.cs (1)
134
Features = Enumerable.
Repeat
(label, 3).Select(x => x +
Dynamic\Transforms\TreeFeaturization\FastTreeBinaryFeaturizationWithOptions.cs (1)
138
Features = Enumerable.
Repeat
(label, 3).Select(x => x ?
Dynamic\Transforms\TreeFeaturization\FastTreeRankingFeaturizationWithOptions.cs (1)
135
Features = Enumerable.
Repeat
(label, 3).Select(x => randomFloat()
Dynamic\Transforms\TreeFeaturization\FastTreeRegressionFeaturizationWithOptions.cs (1)
134
Features = Enumerable.
Repeat
(label, 3).Select(x => x +
Dynamic\Transforms\TreeFeaturization\FastTreeTweedieFeaturizationWithOptions.cs (1)
134
Features = Enumerable.
Repeat
(label, 3).Select(x => x +
Dynamic\Transforms\TreeFeaturization\PretrainedTreeEnsembleFeaturizationWithOptions.cs (1)
145
Features = Enumerable.
Repeat
(label, 3).Select(x => x ?
Microsoft.ML.SearchSpace (4)
Option\ChoiceOption.cs (1)
34
Default = Enumerable.
Repeat
(0.0, FeatureSpaceDim).ToArray();
Option\UniformNumericOption.cs (1)
32
Default = Enumerable.
Repeat
(0.0, FeatureSpaceDim).ToArray();
SearchSpace.cs (1)
155
var featureSpace = Enumerable.
Repeat
(0.5, FeatureSpaceDim).ToArray();
Tuner\RandomTuner.cs (1)
34
var featureVec = Enumerable.
Repeat
(0, d).Select(i => _rnd.NextDouble()).ToArray();
Microsoft.ML.Sweeper (1)
Algorithms\KdoSweeper.cs (1)
251
double[] stddevs = Enumerable.
Repeat
(_args.Simple ? 0.2 : bandwidthScale, mu.Length).ToArray();
Microsoft.ML.Tests (2)
ImagesTests.cs (1)
1109
Features = Enumerable.
Repeat
(0, InputSize).Select(x => random.NextDouble() * 100).ToArray()
TrainerEstimators\TreeEstimators.cs (1)
735
Features = Enumerable.
Repeat
(label, 20)
Microsoft.ML.TimeSeries (3)
SeasonalityDetector.cs (1)
86
FftUtils.ComputeForwardFft(inputRe, Enumerable.
Repeat
(0.0, length).ToArray(), fftRe, fftIm, length);
SrCnnAnomalyDetectionBase.cs (2)
181
FftUtils.ComputeForwardFft(backAddList.ToArray(), Enumerable.
Repeat
(0.0f, length).ToArray(), fftRe, fftIm, length);
255
backAddArray.AddRange(Enumerable.
Repeat
(predictedValue, Parent.BackAddWindowSize));
Microsoft.ML.TimeSeries.Tests (1)
TimeSeries.cs (1)
81
File.WriteAllLines(pathData, Enumerable.
Repeat
("0", 50));
Microsoft.ML.Tokenizers (2)
Model\BertTokenizer.cs (2)
429
mask.AddRange(Enumerable.
Repeat
(0, tokenIds.Count()));
433
mask.AddRange(Enumerable.
Repeat
(0, additionalTokenIds.Count()));
Microsoft.ML.Tokenizers.Tests (4)
TiktokenTests.cs (2)
873
string largeMixedInput = string.Join(" ", Enumerable.
Repeat
("Hello World! This is a test.", 50));
916
string inputMixed = string.Join(" ", Enumerable.
Repeat
("Hello World! Test123", length / 20 + 1)).Substring(0, length);
TokenizerTests.cs (2)
25
string.Concat(Enumerable.
Repeat
("abcdefghijklmnopqrstuvwxyz", 100)),
26
tokenizer.Decode(Enumerable.
Repeat
("abcdefghijklmnopqrstuvwxyz", 100).SelectMany(s => s.Select(c => c - 'a'))));
Microsoft.ML.TorchSharp (3)
Roberta\Models\RobertaModel.cs (3)
44
Zeros = Enumerable.
Repeat
(0, options.MaxSequenceLength).ToArray();
45
Ones = Enumerable.
Repeat
(1, options.MaxSequenceLength).ToArray();
46
NegBillionPad = Enumerable.
Repeat
(negBillion, options.MaxSequenceLength).ToArray();
Microsoft.ML.Transforms (5)
MissingValueReplacing.cs (2)
890
node.AddAttribute("imputed_value_floats", Enumerable.
Repeat
((float)_parent._repValues[iinfo], 1));
896
node.AddAttribute("imputed_value_floats", Enumerable.
Repeat
((float)_parent._repValues[iinfo], 1));
Text\WordEmbeddingsExtractor.cs (3)
427
tensorD.AddRange(Enumerable.
Repeat
(0.0f, _parent._currentVocab.Dimension));
429
tensorD.AddRange(Enumerable.
Repeat
(float.MaxValue, _parent._currentVocab.Dimension));
431
tensorD.AddRange(Enumerable.
Repeat
(float.MinValue, _parent._currentVocab.Dimension));
Microsoft.NET.Sdk.StaticWebAssets.Tasks (2)
ScopedCss\ConcatenateCssFiles.cs (1)
64
var prefix = string.Join("/", Enumerable.
Repeat
("..", currentBasePathSegments.Length));
ScopedCss\ConcatenateCssFiles50.cs (1)
64
var prefix = string.Join("/", Enumerable.
Repeat
("..", currentBasePathSegments.Length));
Microsoft.TemplateEngine.Utils (1)
FileSystemInfoExtensions.cs (1)
103
segments.InsertRange(0, Enumerable.
Repeat
("..", revIndex));
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
99
[.. Enumerable.
Repeat
<ExpressionSyntax>(OmittedArraySizeExpression(), arrayType.Rank)]));
204
? Enumerable.
Repeat
((TypeSyntax)OmittedTypeArgument(), symbol.TypeArguments.Length)
Shared.Tests (2)
JsonSchemaExporter\TestTypes.cs (2)
1119
public IEnumerator<int> GetEnumerator() => Enumerable.
Repeat
(BaseValue, 1).GetEnumerator();
1131
public IEnumerator<KeyValuePair<string, int>> GetEnumerator() => Enumerable.
Repeat
(new KeyValuePair<string, int>(nameof(BaseValue), BaseValue), 1).GetEnumerator();
System.Linq (1)
System\Linq\Sequence.cs (1)
70
return
Repeat
(start, 1);