-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: failing test at tseries/tests/test_base.py TestDatetimeIndexOps test_nat #14345
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
Comments
Thanks for the report, I think the test just needs written with an expectation of |
MattRijk
added a commit
to MattRijk/pandas
that referenced
this issue
Oct 4, 2016
1 task
yarikoptic
added a commit
to neurodebian/pandas
that referenced
this issue
Oct 13, 2016
* commit 'v0.19.0-14-ga40e185': (37 commits) BUG: Bug in localizing an ambiguous timezone when a boolean is passed Convert readthedocs links for their .org -> .io migration for hosted projects (pandas-dev#14406) DOC: formatting in basics.rst BLD/CI: cython cache pxd files (pandas-dev#14363) BUG: set_levels set illegal levels. (pandas-dev#14236) DOC: add whitespace to v0.19.1 bug fix section change impl details slightly for pandas-dev#14292 BUG: Fix concat key name DOC: add 0.19.1 whatsnew file (pandas-dev#14366) DOC: to_csv warns regarding quoting behaviour for floats pandas-dev#14195 (pandas-dev#14228) DOC: fix formatting issue with msgpack table TST: pandas-dev#14345 fixes TestDatetimeIndexOps test_nat AssertionErrors on 32-bit docs: Remove old warning from dsintro.rst (pandas-dev#14365) DOC: minor v0.19.0 whatsnew corrections RLS: v0.19.0 DOC: update release notes DOC: Latest fixes for whatsnew file to_latex encoding follows the documentation (py2 ascii, py3 utf8) (pandas-dev#14329) DOC: fix some sphinx build issues (pandas-dev#14332) TST: fix period tests for numpy 1.9.3 (GH14183) (pandas-dev#14331) ...
tworec
pushed a commit
to RTBHOUSE/pandas
that referenced
this issue
Oct 21, 2016
…rors on 32-bit closes pandas-dev#14345 Author: mattrijk <[email protected]> Closes pandas-dev#14347 from MattRijk/issue#14345 and squashes the following commits: 73ad3d7 [mattrijk] line 2710 formatting update for whitespace ea4f151 [mattrijk] second formatting update for whitespace 262492f [mattrijk] TST: pandas-dev#14345 fixes TestDatetimeIndexOps test_nat AssertionErors
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A small, complete example of the issue
Expected Output
failing test
idx = pd.DatetimeIndex(['2011-01-01', '2011-01-02'], tz=tz)
tm.assert_numpy_array_equal(idx._nan_idxs, np.array([], dtype=np.int64))
idx = pd.DatetimeIndex(['2011-01-01', 'NaT'], tz=tz)
tm.assert_numpy_array_equal(idx._nan_idxs, np.array([1], dtype=np.int64))
test passes
tm.assert_numpy_array_equal(idx._nan_idxs, np.array([], dtype=np.int32))
In Ipython on 32bit the values look fine.
In [3]: idx = pd.DatetimeIndex(['2016-01-01', 'NaT'], tz=None)
In [4]: idx.dtype
Out[4]: dtype('<M8[ns]')
In [5]: idx._nan_idxs
Out[5]: array([], dtype=int64)
In [6]: arry = np.array([], dtype=np.int64)
In [7]: arry
Out[7]: array([], dtype=int64)
In [8]: import pandas.util.testing as tm
In [9]: tm.assert_numpy_array_equal(idx._nan_idxs, arry))
Out[9]: True
This fixes it but I think theres more going on.
import platform
if platform.architecture()[0] == '32bit':
tm.assert_numpy_array_equal(idx._nan_idxs, np.array([], dtype=np.int32))
else:
tm.assert_numpy_array_equal(idx._nan_idxs, np.array([], dtype=np.int64))
Output of
pd.show_versions()
commit: None
python: 2.7.12.final.0
python-bits: 32
OS: Linux
OS-release: 3.13.0-92-generic
machine: i686
processor: i686
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
pandas: 0.19.0
nose: 1.3.7
pip: 8.1.2
setuptools: 27.2.0
Cython: 0.24.1
numpy: 1.11.1
scipy: 0.18.1
statsmodels: None
xarray: None
IPython: 5.1.0
sphinx: 1.4.6
patsy: 0.4.1
dateutil: 2.5.3
pytz: 2016.6.1
blosc: None
bottleneck: 1.1.0
tables: 3.2.3.1
numexpr: 2.6.1
matplotlib: 1.5.3
openpyxl: 2.4.0
xlrd: 1.0.0
xlwt: 1.1.2
xlsxwriter: 0.9.3
lxml: 3.6.4
bs4: 4.3.2
html5lib: 0.999
httplib2: None
apiclient: None
sqlalchemy: 1.0.13
pymysql: 0.7.6.None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: 0.2.1
The text was updated successfully, but these errors were encountered: