Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Conversation

@Hardcode84
Copy link
Contributor

No description provided.

@AlexanderKalistratov
Copy link
Collaborator

@Hardcode84 was you able to check fix suggested by Siu?

@Hardcode84
Copy link
Contributor Author

@Hardcode84 was you able to check fix suggested by Siu?

Will check tomorrow

@Hardcode84
Copy link
Contributor Author

Well, when I try to write c.context.nrt.incref(builder, df_typ, dataframe) instead of current solution I'm getting some nonsense like this:

======================================================================
ERROR: test_df_drop_one_column_unboxing (sdc.tests.test_dataframe.TestDataFrame) (index=['a', 'b', 'c', 'd'])
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ibutygin/src/numba/hpat/sdc/tests/test_dataframe.py", line 1166, in test_df_drop_one_column_unboxing
    pd.testing.assert_frame_equal(sdc_func(df), test_impl(df))
  File "/home/ibutygin/src/numba/numba/numba/dispatcher.py", line 401, in _compile_for_args
    error_rewrite(e, 'typing')
  File "/home/ibutygin/src/numba/numba/numba/dispatcher.py", line 344, in error_rewrite
    reraise(type(e), e, None)
  File "/home/ibutygin/src/numba/numba/numba/six.py", line 668, in reraise
    raise value.with_traceback(tb)
numba.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Invalid use of Function(<function sdc_pandas_dataframe_drop at 0x7f379eee8dd0>) with argument(s) of type(s): (dataframe((array(float64, 1d, C), array(int64, 1d, C), array(float64, 1d, C)), StringArrayType(), ('A', 'B', 'C'), True), columns=unicode_type)
 * parameterized
In definition 0:
    TypingError: Method drop(). The object columns
 given: unicode_type
 expected: str, tuple of str
    raised from /home/ibutygin/src/numba/hpat/sdc/utilities/sdc_typing_utils.py:75
In definition 1:
    TypingError: Method drop(). The object columns
 given: unicode_type
 expected: str, tuple of str
    raised from /home/ibutygin/src/numba/hpat/sdc/utilities/sdc_typing_utils.py:75
This error is usually caused by passing an argument of a type that is unsupported by the named function.
[1] During: resolving callee type: BoundFunction((<class 'sdc.hiframes.pd_dataframe_type.DataFrameType'>, 'drop') for dataframe((array(float64, 1d, C), array(int64, 1d, C), array(float64, 1d, C)), StringArrayType(), ('A', 'B', 'C'), True))
[2] During: typing of call at /home/ibutygin/src/numba/hpat/sdc/tests/test_dataframe.py (1153)


File "sdc/tests/test_dataframe.py", line 1153:
        def test_impl(df):
            return df.drop(columns='A')
            ^

@AlexanderKalistratov
Copy link
Collaborator

Let's merge it as is

@AlexanderKalistratov AlexanderKalistratov merged commit bc86634 into IntelPython:master Feb 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants