Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 19192c1

Browse files
michaelawyubusunkim96
michaelawyu
authored andcommitted
Fixed failed tests on Kokoro (Natural Language API) [(#1185)](GoogleCloudPlatform/python-docs-samples#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 91b2eb7 commit 19192c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/snippets/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)