It is this simple:
def concat_arrays(data: tuple) -> np.ndarray:
return np.hstack(data)
There is no need to iterate through and stack one at a time - that's why you are asked to pass a tuple instead of two separate arguments. (That isn't a real restriction in Python anyway - because *args
exists - but still.)
But of course, there is no point to writing this, as we could simply use np.hstack
directly.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…