Preheat oven to 375°F (190°C).
Wash and peel the purple sweet potatoes. Using a mandoline, slice them into uniform 1/8-inch thick rounds.
In a saucepan, combine coconut cream, milk, garlic, and shallots. Bring to a gentle simmer.
Add thyme, rosemary, nutmeg, salt, and white pepper. Simmer for 5 minutes.
Butter your baking dish. Layer purple sweet potato slices, slightly overlapping.
Pour one-third of the cream mixture over the potatoes and sprinkle with one-third of the cheese mixture.
Repeat layering twice more, ending with cheese on top.
Cover with foil and bake for 30 minutes.
Remove foil and bake for an additional 15 minutes until golden brown and bubbly.
Let rest for 10 minutes before serving.