8000 test_dateindex_conversion fails on Python 3.4 / NumPy 1.8.1 / MPL 1.4 master / Ubuntu 12.04 · Issue #7233 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

test_dateindex_conversion fails on Python 3.4 / NumPy 1.8.1 / MPL 1.4 master / Ubuntu 12.04 #7233

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

Closed
andrewclegg opened this issue May 24, 2014 · 9 comments · Fixed by #8054
Labels
Testing pandas testing functions or related to the test suite Visualization plotting
Milestone

Comments

@andrewclegg
Copy link

With a recent checkout from master (bfd5348), running this

python3.4 `which nosetests` pandas

gives me this:

======================================================================
ERROR: test_dateindex_conversion (pandas.tseries.tests.test_converter.TestDateTimeConverter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/pandas/tseries/tests/test_converter.py", line 77, in test_dateindex_conversion
    xp = converter.dates.date2num(dateindex)
  File "/usr/local/lib/python3.4/dist-packages/matplotlib/dates.py", line 310, in date2num
    return _to_ordinalf_np_vectorized(d)
  File "/usr/local/lib/python3.4/dist-packages/numpy/lib/function_base.py", line 1573, in __call__
    return self._vectorize_call(func=func, args=vargs)
  File "/usr/local/lib/python3.4/dist-packages/numpy/lib/function_base.py", line 1633, in _vectorize_call
    ufunc, otypes = self._get_ufunc_and_otypes(func=func, args=args)
  File "/usr/local/lib/python3.4/dist-packages/numpy/lib/function_base.py", line 1597, in _get_ufunc_and_otypes
    outputs = func(*inputs)
  File "/usr/local/lib/python3.4/dist-packages/matplotlib/dates.py", line 204, in _to_ordinalf
    base = float(dt.toordinal())
AttributeError: 'numpy.datetime64' object has no attribute 'toordinal'

----------------------------------------------------------------------
Ran 7152 tests in 4107.297s

FAILED (SKIP=381, errors=1)

Looks like it's actually matplotlib's fault -- I notice there's a relevant ticket here:

matplotlib/matplotlib#2259

But is this test expected to fail, as a result of that? And if so, should it be marked as skipped?

I'm using a very recent checkout of matplotlib (matplotlib/matplotlib@4b1bd63).

@jreback
Copy link
Contributor
jreback commented May 24, 2014

we currently don't test with dev matplotlib (we do test with numpy dev and several versions of matplotlib released though)

could setup another build to do it
need to model after the numpy dev build

interested in doing a pr to try this (I will have to create some wheels for other deps - but not that hard)

@jreback jreback added the CI label May 25, 2014
@jreback jreback added this to the 0.14.1 milestone May 25, 2014
@andrewclegg
Copy link
Author

Is it definitely only a problem with dev versions? matplotlib/matplotlib#2259 has been around for nearly a year.

Happy to help out with testing Pandas against MPL dev, if that's useful -- having said that, I'm on a mission to get a first proper release of Snake Charmer out, which is taking quite a lot of devops-ish attention... So I may not be the fastest.

@jreback
Copy link
Contributor
jreback commented May 25, 2014

I think only a problem with matplotlib dev as 1.3.1 tests ok
@TomAugspurger correct me if I am wrong

ok if u have time pls submit a pr - otherwise will prob do it after 0.14.0 is released

snake charmer looks interesting!

FYI u might want to build pip wheels and host from GitHub
this would make your install time extremely fast (we do this for pandas test and install pretty much the whole stack in a couple of minutes - mainly it's download time)

@TomAugspurger
Copy link
Contributor

I think this was the relevant issue and PR

I recall hitting this problem before. I'll see if I can track down where.

@jreback
Copy link
Contributor
jreback commented Jun 19, 2014

@TomAugspurger ?

@jreback jreback modified the milestones: 0.15.0, 0.14.1 Jun 22, 2014
@jreback
Copy link
Contributor
jreback commented Jun 22, 2014

@TomAugspurger ?

@tacaswell
Copy link
Contributor

mlp dev here.

It is my understanding that mpl has never claimed to support np.datetime64, so we think it is a bug on the pandas side for sending in datetime64

We are in the process of getting 1.4.0 out the door (tagged rc4 today) so we should get this sorted out asap.

@jreback
Copy link
Contributor
jreback commented Aug 18, 2014

cc @sinhrks can u have a look at this

@sinhrks
Copy link
Member
sinhrks commented Aug 18, 2014

Yep, could reproduce using mpl 1.4.dev.

Because DatetimeIndex will not be passed as it is from plotting function, it looks OK to change the test to call dateindex._mpl_repr().
https://github.com/pydata/pandas/blob/master/pandas/tools/plotting.py#L1145

I'll check other tests and send a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite Visualization plotting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
0