filmov
tv
#task14 Use split method an array numpy in python | Python Tutorial For Beginners #Shaheencodingzone

Показать описание
#task14
def function14():
# Create an 8X3 integer array from a range between 10 to 34 such that the difference between each element is 1 and then Split the array into four equal-sized sub-arrays.
# Hint use split method
ans = #write your code here
return ans
"""
Expected Output:
[array([[10, 11, 12],[13, 14, 15]]),
array([[16, 17, 18],[19, 20, 21]]),
array([[22, 23, 24],[25, 26, 27]]),
array([[28, 29, 30],[31, 32, 33]])]
"""
def function14():
# Create an 8X3 integer array from a range between 10 to 34 such that the difference between each element is 1 and then Split the array into four equal-sized sub-arrays.
# Hint use split method
ans = #write your code here
return ans
"""
Expected Output:
[array([[10, 11, 12],[13, 14, 15]]),
array([[16, 17, 18],[19, 20, 21]]),
array([[22, 23, 24],[25, 26, 27]]),
array([[28, 29, 30],[31, 32, 33]])]
"""