CODAIT / text-extensions-for-pandas

Natural language processing support for Pandas dataframes.
Apache License 2.0
215 stars 34 forks source link

Bug in Pandas 1.3.0 block manager breaks tests for TensorArray #221

Open frreiss opened 2 years ago

frreiss commented 2 years ago

The test cases under TestPandasSetitem.test_setitem_series() fail on Pandas 1.3.0 due to https://github.com/pandas-dev/pandas/issues/42437.

These tests create a Series of dtype object and attempt to assign a TensorArray to that series. They fail because Pandas passes the TensorArray through numpy.asarray(), which turns the TensorArray into a 2D ndarray instead of a 1D array of ndarray objects.

Users should be able to work around this issue for now by explicitly casting TensorArrays to dtype of object, then performing the assignment.

frreiss commented 2 years ago

Tests temporarily disabled in https://github.com/CODAIT/text-extensions-for-pandas/pull/218/commits/50a985e5e94ff1854633e177b1574fffdc4e60b3

frreiss commented 2 years ago

Keep this issue open until the upstream bug is patched, then re-enable the tests, then close this issue.