8000 Fixed failed tests on Kokoro (Natural Language API) (#1185) · johnmanong/python-docs-samples@4e17dbf · GitHub
[go: up one dir, main page]

Skip to content

Commit 4e17dbf

Browse files
michaelawyuJon Wayne Parrott
authored andcommitted
Fixed failed tests on Kokoro (Natural Language API) (GoogleCloudPlatform#1185)
* Add Snippet for Listing All Subscriptions in a Project * Fixed the failed tests on Kokoro classify_text_tutorial_test.py::test_query_text classify_text_tutorial_test.py::test_query_category
1 parent 849f315 commit 4e17dbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

language/classify_text/classify_text_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ def similarity(categories1, categories2):
133133
categories1 = split_labels(categories1)
134134
categories2 = split_labels(categories2)
135135

136-
norm1 = numpy.linalg.norm(categories1.values())
137-
norm2 = numpy.linalg.norm(categories2.values())
136+
norm1 = numpy.linalg.norm(list(categories1.values()))
137+
norm2 = numpy.linalg.norm(list(categories2.values()))
138138

139139
# Return the smallest possible similarity if either categories is empty.
140140
if norm1 == 0 or norm2 == 0:

0 commit comments

Comments
 (0)
0