subject

L2 = underroot sigma n i = 1 (ai - bi)2 Assume a and b are two (20, 20) numpy arrays. The L2-distance (defined above) between two equal dimension arrays can be calculated in python as follows:
def 12_dist(a, b):
result ((a - b) * (a - b)). sum)
result = result ** 0.5
return result
Which of the following expressions using this function will give an error?
a. 12_dist(np. reshape(a, (20 * 20)), np. reshape(b, (20 * 20, 1)))
b. 12_dist(a, b)
c. 12_dist(np. reshape(a, (20 * 20)), np. reshape(b, (20 * 20)))
d. 12_dist(a. T, 5.1)
Given the 6x6 NumPy array r shown below, which of the following options would slice the shaded elements?
0 1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25
26 27 28 29 30
31 32 33 34 35
a. r[2:3,2:3]
b. r[[2,4],[2,4]]
c. r[[2,3],[2,3]]
d. r[2:4, 2:4)
Which of the following is the correct regular expression to extract all the phone numbers from the following chunk of text?
Office of Research Administration: (734) 647-6333 | 4325 North Quad
Office of Budget and Financial Administration: (734) 647-8844 | 309 Maynard, Suite 205
Health Informatics Program: (734) 763-2285 | 333 Maynard, Suite 500
Office of the Dean: (734) 647-3576 | 4322 North Quad
UMSI Engagement Center: (734) 763-1251 | 777 North University
Faculty Adminstrative Support Staff: (734) 764-9376 | 4322 North Quad'
a. \d{3}\s\d{3}[-]\d{4}
b. [C]\d{3}[)]\s\d{3}[-] \d{4}
c. \d{3}[ - ]\d{3}[ - ] \d{4}
d. [(]\d{3}[)]\d{3}[-]\d{4}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:30
Define a function printfeetinchshort, with int parameters numfeet and numinches, that prints using ' and " shorthand. ex: printfeetinchshort(5, 8) prints: 5' 8"
Answers: 1
question
Computers and Technology, 23.06.2019 01:20
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
question
Computers and Technology, 23.06.2019 18:00
Ramona enjoys her job because she is able to kids in an after school program. the work value ramona feels strongest about is a. leadership b. risk c. independence d. work with people select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 24.06.2019 18:00
Which of the following is an example of synchronous communication? a) e-mail b) voicemail c) telephone conversation d) text message.
Answers: 1
You know the right answer?
L2 = underroot sigma n i = 1 (ai - bi)2 Assume a and b are two (20, 20) numpy arrays. The L2-distan...
Questions
Questions on the website: 13722362