Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Don't call np.min on generator. #7608

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

Merged
merged 1 commit into from
Dec 11, 2016
Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Dec 11, 2016

Without this fix, yscale("log"); bar([1, 2], [3, 4]) errors as
np.min cannot handle being passed a generator.

Milestoning as 2.0 as this is a regression from 1.5.3.

Without this fix, `yscale("log"); bar([1, 2], [3, 4])` errors as
`np.min` cannot handle being passed a generator.
@anntzer anntzer added this to the 2.0 (style change major release) milestone Dec 11, 2016
@tacaswell tacaswell merged commit 8e6df9d into matplotlib:master Dec 11, 2016
@tacaswell
Copy link
Member

Looks like this bug is not on the 2.x branch:

        if adjust_xlim:
            xmin, xmax = self.dataLim.intervalx
            xmin = np.amin([w for w in width if w > 0])
            if xerr is not None:
                xmin = xmin - np.amax(xerr)
            xmin = max(xmin * 0.9, 1e-100)
            self.dataLim.intervalx = (xmin, xmax)

        if adjust_ylim:
            ymin, ymax = self.dataLim.intervaly
            ymin = np.amin([h for h in height if h > 0])
            if yerr is not None:
                ymin = ymin - np.amax(yerr)
            ymin = max(ymin * 0.9, 1e-100)
            self.dataLim.intervaly = (ymin, ymax)

@tacaswell
Copy link
Member

This came in via de302f5 / #7547 which did not get backported.

@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.0 (style change major release) Dec 11, 2016
@anntzer
Copy link
Contributor Author

anntzer commented Dec 11, 2016

oops :)

@anntzer anntzer deleted the fix-bar-log branch December 11, 2016 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants