Bug#918206: Pandas new version (not?)

Rebecca N. Palmer rebecca_palmer at zoho.com
Wed Feb 13 07:42:49 GMT 2019


Given the soft freeze, the new upstream version is probably no longer an 
option for buster.

Just setting __array_priority__ fails, but with a message that suggests 
also including the test_analytics part of that upstream commit would 
work; I haven't yet had time to try this.


left =         one       two
0 -1.365296  1.088132
1 -1.668353  3.025582
2  0.343140 -0.260306
right = array([[-1.36529629,  1.08813166],
        [-1.66835336,  3.02558216],
        [ 0.34314   , -0.26030576]])
cls = <class 'pandas.core.frame.DataFrame'>

     def _check_isinstance(left, right, cls):
         """
         Helper method for our assert_* methods that ensures that
         the two objects being compared have the right type before
         proceeding with the comparison.

         Parameters
         ----------
         left : The first object being compared.
         right : The second object being compared.
         cls : The class type to check against.

         Raises
         ------
         AssertionError : Either `left` or `right` is not an instance of 
`cls`.
         """

         err_msg = "{name} Expected type {exp_type}, found {act_type} 
instead"
         cls_name = cls.__name__

         if not isinstance(left, cls):
             raise AssertionError(err_msg.format(name=cls_name, 
exp_type=cls,
                                                 act_type=type(left)))
         if not isinstance(right, cls):
             raise AssertionError(err_msg.format(name=cls_name, 
exp_type=cls,
 >                                               act_type=type(right)))
E           AssertionError: DataFrame Expected type <class 
'pandas.core.frame.DataFrame'>, found <class 'numpy.ndarray'> instead

../debian/tmp/usr/lib/python3/dist-packages/pandas/util/testing.py:296: 
AssertionError



More information about the debian-science-maintainers mailing list