removed unnecessary scipy import
avoid division by zero when ViewBox has size or aspect = 0