+ 2

What is output of numpy.zero((2,3))

30th Dec 2019, 1:54 PM
AARTI SHELAR
AARTI SHELAR - avatar
8 ответов
0
[[0,0,0],[0,0,0]]
30th Dec 2019, 2:01 PM
Abdol Hashimi
Abdol Hashimi - avatar
0
It creates an 2x3 array and fill it with zeros
30th Dec 2019, 2:01 PM
Abdol Hashimi
Abdol Hashimi - avatar
0
Yes ,I know but there I want space between each element and no "," as [[ 0. 0. 0.]] # it is 1D ex
30th Dec 2019, 2:03 PM
AARTI SHELAR
AARTI SHELAR - avatar
0
I hope u understand my problem
30th Dec 2019, 2:05 PM
AARTI SHELAR
AARTI SHELAR - avatar
0
AARTI SHELAR Its not a string it an Array and in arrays the spreator indicator is (,) You can convert it to string and put space between them
30th Dec 2019, 2:05 PM
Abdol Hashimi
Abdol Hashimi - avatar
0
res = "" for x in array: for y in x: res += y + " " res += "\n" but in array you cant change (,) to space thata how it work :)
30th Dec 2019, 2:07 PM
Abdol Hashimi
Abdol Hashimi - avatar
0
No, u can check on other operating systems it gives as I'm mention above I mean without commas Actually I'm solving problem and it easy but it give me error ??
30th Dec 2019, 2:09 PM
AARTI SHELAR
AARTI SHELAR - avatar
0
AARTI SHELAR send me your problem, i'll be happy to help u with that
30th Dec 2019, 2:12 PM
Abdol Hashimi
Abdol Hashimi - avatar