What is the purpose of the np.concatenate() function?
Correct answer
B. To join arrays along an existing axis
19 views
B. To join arrays along an existing axis
19 views
np.concatenate() joins a sequence of arrays along an existing axis: np.concatenate((a, b), axis=0). The arrays must match in shape except along that axis.
Splitting is done with np.split(), and evenly spaced values come from np.linspace().
Want more practice? Try the full set of Data Science MCQs on MCQsExam.com.
Not sure why the answer is B? Ask here and get an explanation.