Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Division by zero in AutoMinorLocator #8804

Closed
ffteja opened this issue Jun 26, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@ffteja
Copy link
Contributor

commented Jun 26, 2017

In ticker.py / AutoMinorLocator class / call function, there is a code mistake that results in a division by zero:
if len(majorlocs) > 0 :
should be replaced by :
if len(majorlocs) > 1 :

Otherwise this can happen :

majorstep = 0
minorstep = majorstep / ndivs
tmin = ((vmin - t0) // minorstep + 1) * minorstep

BOUM !

@tacaswell

This comment has been minimized.

Copy link
Member

commented Jun 26, 2017

Can you please open a PR with that change?

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Jun 26, 2017

@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.1.1 (next bug fix release) Sep 24, 2017

@tacaswell tacaswell modified the milestones: 2.1.1 (next bug fix release), 2.2 (next feature release) Oct 9, 2017

meeseeksdev bot pushed a commit that referenced this issue Oct 20, 2017

@NelleV NelleV closed this in 473e25c Oct 20, 2017

@QuLogic QuLogic modified the milestones: v2.2, v2.1.1 Oct 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.