Computers and Technology

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}

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:00, kiaunarayne808
The width of a piece of rectangular land is 5m shorter rhan 1/3 of its length .find the width of the land if the length is 60m,150m.
Answers: 1
image
Computers and Technology, 22.06.2019 19:20, SundaeSunday
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given. b)the definition of max_balance should be removed since header files should not contain constants. c)the definition of cashregister should be removed since header files should not contain class definitions. d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
image
Computers and Technology, 23.06.2019 02:00, magicalunicorns47
Arecipients list has been loaded into a document. which commands should be clicked in order to filter the list so that letters will not be printed for recipients who live in a certain state? mailings tab, start mail merge, select recipients, type new list, then insert only contacts from the desired states mailings tab, rules, select recipients, use existing list, then choose a recipients list that includes only contacts in certain states mailings tab, select recipients, use existing list, rules, fill in, then type in certain states mailings tab, rules, skip record select “state” under field name, then type in the state name under “equal to”
Answers: 2
image
Computers and Technology, 23.06.2019 07:00, bskyeb14579
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
Do you know the correct answer?
L2 = underroot sigma n i = 1 (ai - bi)2 Assume a and b are two (20, 20) numpy arrays. The L2-distan...

Questions in other subjects: