A Primal-dual Learning Algorithm for Personalized Dynamic Pricing with an Inventory Constraint