21 references to Assert
Microsoft.ML.Core (21)
Data\IFileHandle.cs (3)
113Contracts.Assert(false, "Closing a SimpleFileHandle write stream failed!"); 128Contracts.Assert(false, "Closing a SimpleFileHandle read stream failed!"); 145Contracts.Assert(false, "Deleting a SimpleFileHandle physical file failed!");
Data\RoleMappedSchema.cs (1)
170Contracts.Assert(!schema[info.Index].IsHidden, "How did a hidden column sneak in?");
Utilities\BigArray.cs (1)
93Contracts.Assert(BlockSize > 1 && (BlockSize & (BlockSize - 1)) == 0, "Block size is not a power of two.");
Utilities\BitUtils.cs (3)
177Contracts.Assert(0 <= ibit && ibit < CbitUint, "UMaskBelow is designed to work for 0 <= ibit < 32"); 184Contracts.Assert(0 <= ibit && ibit < CbitUlong, "UMaskBelowEx is designed to work for 0 <= ibit < 64"); 193Contracts.Assert(0 <= ibit && ibit < CbitUlong, "UuMaskBelow is designed to work for 0 <= ibit < 64");
Utilities\Contracts.cs (1)
74Contracts.Assert(false, "Format string arg mismatch: " + ex.Message);
Utilities\FixedSizeQueue.cs (5)
25Contracts.Assert(capacity > 0, "Array capacity should be greater than zero"); 96Contracts.Assert(_count != 0, "Array is empty"); 103Contracts.Assert(_count != 0, "Array is empty"); 110Contracts.Assert(_count != 0, "Array is empty"); 122Contracts.Assert(_count != 0, "Array is empty");
Utilities\HybridMemoryStream.cs (1)
175Contracts.Assert(tmp, "TryGetBuffer failed in HybridMemoryStream");
Utilities\MathUtils.cs (1)
26Contracts.Assert(false, "Bad use of ToFloat");
Utilities\MatrixTransposeOps.cs (2)
33Contracts.Assert(src != dst, "Transpose in place not supported"); 84Contracts.Assert(src != dst, "Transpose in place not supported");
Utilities\SupervisedBinFinder.cs (2)
108Contracts.Assert(boundaries.Length == 1 && boundaries[0] == 0 || boundaries[0] > 0, "boundaries are exclusive, can't have 0"); 186Contracts.Assert(boundaries.Length == 1 && boundaries[0] == 0 || boundaries[0] > 0, "boundaries are exclusive, can't have 0");
Utilities\Utils.cs (1)
721Contracts.Assert(length >= 0, "Length can't be negative");