Does numpy work with strings? Can you just pass the domains array and get rid of the map?