test_empty_matrices() — langchain Function Reference
Architecture documentation for the test_empty_matrices() function in test_utils.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD c29918d6_910b_662b_8d38_2291810c2214["test_empty_matrices()"] 43305d93_a58a_e7db_615b_b8a5a18284ab["TestCosineSimilarity"] c29918d6_910b_662b_8d38_2291810c2214 -->|defined in| 43305d93_a58a_e7db_615b_b8a5a18284ab style c29918d6_910b_662b_8d38_2291810c2214 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/vectorstores/test_utils.py lines 86–92
def test_empty_matrices(self) -> None:
"""Test with empty matrices."""
x: list[list[float]] = []
y: list[list[float]] = []
result = _cosine_similarity(x, y)
expected = np.array([[]])
np.testing.assert_array_equal(result, expected)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_empty_matrices() do?
test_empty_matrices() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/vectorstores/test_utils.py.
Where is test_empty_matrices() defined?
test_empty_matrices() is defined in libs/core/tests/unit_tests/vectorstores/test_utils.py at line 86.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free