The Numpy functions vstack and hstack concatenate arrays.
Assemble the complete picture from the images in :download:`pieces.zip`.
Here is the code that assembles two of the pieces:
.. literalinclude:: puzzle.py
- the functions
np.vstack
andnp.hstack
accept a list of NumPy arrays - one dimension of the arrays needs to be identical
- use
print(x.shape)
a lot - the order in which you assemble matters
Create your own puzzle. In :download:`make_pieces.py` you find code that was used to create pieces.