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

unit_scatter.py example crashes on Python 3.4 #5286

Closed
mdboom opened this issue Oct 20, 2015 · 3 comments
Closed

unit_scatter.py example crashes on Python 3.4 #5286

mdboom opened this issue Oct 20, 2015 · 3 comments
Labels
Difficulty: Hard https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
Milestone

Comments

@mdboom
Copy link
Member

mdboom commented Oct 20, 2015

Both Numpy 1.9 and 1.10 have the same issue. Python 2.7 seems fine.

Traceback (most recent call last):
  File "/Users/mdroettboom/Work/builds/matplotlib/examples/units/basic_units.py", line 126, in __new__
    return object.__new__(subcls, value, unit)
TypeError: object.__new__(TaggedValue_of_MaskedArray) is not safe, use numpy.ndarray.__new__()

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "units_scatter.py", line 18, in <module>
    xsecs = secs*np.ma.MaskedArray((1, 2, 3, 4, 5, 6, 7, 8), (1, 0, 1, 0, 0, 0, 1, 0), np.float)
  File "/Users/mdroettboom/Work/builds/matplotlib/examples/units/basic_units.py", line 221, in __mul__
    return TaggedValue(value, unit)
  File "/Users/mdroettboom/Work/builds/matplotlib/examples/units/basic_units.py", line 130, in __new__
    return object.__new__(cls, value, unit)
TypeError: object() takes no parameters
@mdboom mdboom added this to the next point release (1.5.0) milestone Oct 20, 2015
@mdboom mdboom added the Difficulty: Hard https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues label Oct 20, 2015
@jenshnielsen
Copy link
Member

I had a simple fix in #3838 but it's really not the right way to do it.

@mdboom
Copy link
Member Author

mdboom commented Oct 20, 2015

Great! I think merging #3838 is fine.

@mdboom
Copy link
Member Author

mdboom commented Oct 20, 2015

Closed by #3838

@mdboom mdboom closed this as completed Oct 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Hard https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
Projects
None yet
Development

No branches or pull requests

2 participants