Skip to content

Commit

Permalink
Improved code [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Jun 21, 2024
1 parent 2f8a39d commit 3a96455
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pgvector/SparseVector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public class SparseVector
public ReadOnlyMemory<float> Values { get; }

// caller must ensure:
// 1. indices are sorted and unique
// 1. indices are sorted, unique, >= 0, and < dimensions
// 2. values does not contain zeros
public SparseVector(int dimensions, ReadOnlyMemory<int> indices, ReadOnlyMemory<float> values)
{
if (values.Length != indices.Length)
if (indices.Length != values.Length)
{
throw new ArgumentException("indices and values must be same length");
}
Expand Down

0 comments on commit 3a96455

Please sign in to comment.