Tailoring the topology of an artificial magnetic skyrmion