append a numpy array to a numpy array
- by Fraz
I just started programming in python and am very new to numpy packages.. so still trying to get a hang of it.
I have a an numpy_array
so something like [ a b c]
And then I want to append it into anotehr numpyarray
(Just like we create a list of lists)
How do we create an array of numpy arrays containing numpy arrays
I tried to do the following without any luck
>>> M = np.array([])
>>> M
array([], dtype=float64)
>>> M.append(a,axis=0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'numpy.ndarray' object has no attribute 'append'
>>> a
array([1, 2, 3])