Skip to content

Commit

Permalink
Fixed failed tests on Kokoro (Natural Language API) (GoogleCloudPlatf…
Browse files Browse the repository at this point in the history
…orm#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
  • Loading branch information
michaelawyu authored and Jon Wayne Parrott committed Nov 1, 2017
1 parent 849f315 commit 4e17dbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions language/classify_text/classify_text_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ def similarity(categories1, categories2):
categories1 = split_labels(categories1)
categories2 = split_labels(categories2)

norm1 = numpy.linalg.norm(categories1.values())
norm2 = numpy.linalg.norm(categories2.values())
norm1 = numpy.linalg.norm(list(categories1.values()))
norm2 = numpy.linalg.norm(list(categories2.values()))

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

0 comments on commit 4e17dbf

Please sign in to comment.