Place the potato and yam cubes into a saucepan of hot water and bring to a boil.
Reduce the heat and simmer for 12-15 minutes until both vegetables are soft.
Drain and place the yam and potato back in the saucepan.
Using a potato ricer, mash until smooth and the two colours are totally mixed, adding the garlic, salt and pepper to taste.
Transfer to a large bowl and add the flour, kneading the mixture into a dough. (It’s tempting to add less flour as the mixture can look a little dry – don’t do it!)
Using your hands, divide the dough into four pieces.
On a floured surface, roll them into sausages about 2cm wide with your hands and cut each into 1.5cm-wide slices.
Roll each slice gently to make it more of a tube shape, and if you wish gently roll a fork along each piece for texture.
To cook, add all the gnocchi to a large pan of boiling water. When they float to the surface, cook for another 30 seconds and then drain. (You may need to do this in two batches.)
Spread gnocchi out on a large plate to prevent sticking until ready for use.