Skip to content

Alternatives for obtaining Square Root #10

Answered by manel1874
emanuel-skai asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @emanuel-skai, thanks for reporting this!

  1. There is indeed a bug with the Arrays datatype within the nada run tool. We will look into the root cause of the issue and get back to you once it is solved.
  2. Beside this bug, your program is using Python if-else statements which we currently do not support.

However, we support a "pick between two values" version of if-else statements: a.if_else(b, c) (docs). This allows to either pick value b or c based on the boolean a. In your example, you can have instead:

    # find the closest document, initialize the closest distance and index
    closest_distance = euclidean_distance_array[0]
    closest_index = Integer(0)
    # iterate through the euc…

Replies: 0 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@wwwehr
Comment options

@manel1874
Comment options

Answer selected by emanuel-skai
@emanuel-skai
Comment options

@manel1874
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants