Skip to content

COMPAT: sparse issue on compat build #12784

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
jreback opened this issue Apr 3, 2016 · 3 comments
Closed

COMPAT: sparse issue on compat build #12784

jreback opened this issue Apr 3, 2016 · 3 comments
Labels
Compat pandas objects compatability with Numpy or Python functions Sparse Sparse Data Type Testing pandas testing functions or related to the test suite
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Apr 3, 2016

xref #12779

https://travis-ci.org/pydata/pandas/jobs/120431675

I suspect because of numpy=1.7.1

======================================================================
ERROR: test_take (pandas.sparse.tests.test_array.TestSparseArray)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/pydata/pandas/pandas/sparse/tests/test_array.py", line 40, in test_take
    self.assertEqual(self.arr.take(2), np.take(self.arr_data, 2))
  File "/home/travis/miniconda/envs/pandas/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 104, in take
    return take(indices, axis, out, mode)
ValueError: object of too small depth for desired array

on win64, python 3.5, numpy ==1.10.4
This is prob a take issue as well, I think these should always be int32 (the block locations).

======================================================================
FAIL: test_sparse_max_row (pandas.tests.test_format.TestSeriesFormatting)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\conda\Documents\pandas3.5\pandas\tests\test_format.py", line 3721, in test_sparse_max_row
    self.assertEqual(result, exp)
AssertionError: '0   [98 chars]0, 3])\nBlock lengths: array([1, 1])' != '0   [98 chars]0, 3], dtype=int32)\nBlock length
s: array([1, 1], dtype=int32)'
  0    1.0
  1    NaN
  2    NaN
  3    3.0
  4    NaN
  dtype: float64
  BlockIndex
- Block locations: array([0, 3])
+ Block locations: array([0, 3], dtype=int32)
?                              +++++++++++++
- Block lengths: array([1, 1])+ Block lengths: array([1, 1], dtype=int32)?                            +++++++++++++
@jreback jreback added Sparse Sparse Data Type Compat pandas objects compatability with Numpy or Python functions labels Apr 3, 2016
@jreback jreback added this to the 0.18.1 milestone Apr 3, 2016
@jreback
Copy link
Contributor Author

jreback commented Apr 3, 2016

@sinhrks

@jreback jreback added the Testing pandas testing functions or related to the test suite label Apr 3, 2016
@jreback jreback changed the title COMPAT: numpy 1.7.1 sparse issue on compat build COMPAT: sparse issue on compat build Apr 3, 2016
@jreback
Copy link
Contributor Author

jreback commented Apr 3, 2016

2nd fixed here: jreback@a6b1a22

@jreback jreback closed this as completed in ee4c2c7 Apr 3, 2016
@jreback
Copy link
Contributor Author

jreback commented Apr 3, 2016

@sinhrks np.take in < 1.8 doesn't support indexing via scalars :<

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Sparse Sparse Data Type Testing pandas testing functions or related to the test suite
Projects
None yet
Development

No branches or pull requests

1 participant