Closed yarikoptic closed 11 years ago
passes fine with numpy 1.7.1....can you print out these dt64 and day64 (and their dtypes)?
what arch is this on?
sorry..you already posted the OS!
@cpcloud how do I build numpy on 3? the usual python3 setup.py build
doesn't seem to work?
r u in a virtualenv?
can u pip install numpy
it? any reason not to do that?
this is not a virtuenv....sort of an older install....I have a cloned numpy....but weird that no instructions to build py3
let me see if i can do it on my box...it's been a while since i haven't used virtualenv
builds ok for me outside of venv with python3.3 setup.py build
stupid question: did u give the minor version? python3.2 works for me as well.
@jreback where does the build fail for you?
if you have a debian-based system you can easily debootstrap a similiar sid environment. Let me know if you need a 1 liner
test_cached_range (pandas.tseries.tests.test_daterange.TestCustomDateRange) ... > /home/yoh/deb/gits/pkg-exppsy/build-area/pandas-0.12.0~rc1+git90-g4c2d050/debian/tmp/usr/lib/python3/dist-packages/pandas/tseries/offsets.py(453)apply()
-> time = dt64 - day64
(Pdb) print dt64
numpy.datetime64('2008-12-31T19:00:00.000000-0500')
(Pdb) print day64
numpy.datetime64('2009-01-01')
(Pdb) dt64 - day64
*** TypeError: Cannot cast ufunc subtract input from dtype('<M8[D]') to dtype('<M8[us]') with casting rule 'same_kind'
I recloned and it built fine...(I had py2.7 inplace, maybe that doesn't work with numpy for some reason)
@cpcloud -- whenever there is more than 1 soul in the discussion, please direct your questions with @nickname
, otherwise hard to deduce whom you ask.
Cheers
@yarikoptic no problem! sorry bout that
@yarikoptic
do you get an error doing this? (works fine on 1.7.1 as well)
In [1]: x = numpy.datetime64('2008-12-31T19:00:00.000000-0500')
In [2]: x-numpy.datetime64('2009-01-01')
Out[2]: numpy.timedelta64(0,'us')
In [3]: np.__version__
Out[3]: '1.8.0.dev-b55f275'
In [4]: import sys
In [5]: sys.version
Out[5]: '3.3.0 (default, Feb 1 2013, 08:25:35) \n[GCC 4.4.5]'
(Pdb) x = np.datetime64('2008-12-31T19:00:00.000000-0500')
(Pdb) x-np.datetime64('2009-01-01')
*** TypeError: Cannot cast ufunc subtract input from dtype('<M8[D]') to dtype('<M8[us]') with casting rule 'same_kind'
(Pdb) np.__version__
'1.8.0.dev-Unknown'
(Pdb) import sys
(Pdb) sys.version
'3.2.4 (default, May 8 2013, 20:55:18) \n[GCC 4.7.3]'
that is really odd..
how old 1.8 are you running? (I ran with master)
Mine is actually 1.7.1 release according to the Debian package version... not sure why python3 build reports it as 1.8.0.dev while python one correctly as 1.7.1
so the only different between what you are running and below is python 3.2.4 vs 3.2.3? if so that is REALLY weird
Python 3.2.3 (default, Jun 5 2013, 15:13:28)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> np.__version__
'1.7.1'
>>> x = np.datetime64('2008-12-31T19:00:00.000000-0500')
>>> x-numpy.datetime64('2009-01-01')
>>> x-np.datetime64('2009-01-01')
numpy.timedelta64(0,'us')
grrr.... that 1.8.0.dev it was not 1.7.1 -- I had some stale /local installation (not sure how it got there) which was picked up (just removed it now).
I will try to rebuild now with stock 1.7.1 all around
On Tue, 16 Jul 2013, jreback wrote:
that is really odd..
how old 1.8 are you running? (I ran with master)
— Reply to this email directly or [1]view it on GitHub.
References
Visible links
Yaroslav O. Halchenko, Ph.D. http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org Senior Research Associate, Psychological and Brain Sciences Dept. Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755 Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419 WWW: http://www.linkedin.com/in/yarik
@yarikoptic great...let us know!
@yarikoptic resolved?
seems to me
$> grep -e nosetests -e test_repr.*pandas.tseries.tests.test_daterange.TestCustomDateRang pandas_0.12.0~rc1+git101-gd070a1f-1_amd64.build
cd build/; python2.7 /usr/bin/nosetests -s -v -a '!network' pandas;
test_repr (pandas.tseries.tests.test_daterange.TestCustomDateRange) ... ok
cd build/; python3.2 /usr/bin/nosetests -s -v -a '!network' pandas;
test_repr (pandas.tseries.tests.test_daterange.TestCustomDateRange) ... ok
in pandas.tseries.tests.test_daterange.TestCustomDateRange tests many fail at v0.12.0rc1-90-g4c2d050
system info