10000 Fixed failed tests on Kokoro (Natural Language API) [(#1185)](https:/… · googleapis/google-cloud-python@e37000c · GitHub
[go: up one dir, main page]

Skip to content

Commit e37000c

Browse files
michaelawyubusunkim96
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 20e53c4 commit e37000c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/google-cloud-language/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)
0