X Tutup
Skip to content

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

Merged
tacaswell merged 1 commit intomatplotlib:masterfrom
anntzer:fix-bar-log
Dec 11, 2016
Merged

Don't call np.min on generator.#7608
tacaswell merged 1 commit intomatplotlib:masterfrom
anntzer:fix-bar-log

Conversation

@anntzer
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

X Tutup