-
Notifications
You must be signed in to change notification settings - Fork 62
Implement Series.sum() in new style #203
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a tests for this functionality? Did you try them with HPAT_CONFIG_PIPELINE_HPAT=0 to make sure Numba could work with it?
Overall approach is good.
|
With HPAT_CONFIG_PIPELINE_HPAT=0 the old test hpat.tests.test_series.TestSeries.test_series_sum2 do not work: As I can understand |
|
@PokhodenkoSA I see the test ( Operators should be implemented separately (in other PRs). |
|
please resolve conflicts |
|
@shssf, I need help. I have made all modifications we usually do for disabling old approach for
Moreover, I have fixed call for hpat.hiframes.pd_series_ext.SeriesAttribute.resolve_sum() in hpat/hiframes/pd_dataframe_ext.py (SeriesAttribute has no resolve_sum, see point 3 above). Finally I got this errors: And many errors like that in different test suites: I have no idea what to do else. |
|
@PokhodenkoSA I will take a look |
Implement Series.sum() in new style Commented 'sum' in series_kernels.py series_replace_funcs list because the line is helpful and will be deleted later. Removed kwargs, use skipna for selecting numpy.sum() or numpy.nansum(), use the same parameters for hpat_pandas_series_sum_impl Add tests for Series.sum() Skip test_series_sum2 because Series sum operator is not implemented Uncomment sum in series_replace_funcs because it breaks many tests Use numba.typing.arraydecl.ArrayAttribute.resolve_sum() instead of hpat.hiframes.pd_series_ext.SeriesAttribute.resolve_sum() in SumDummyTyper.generic() because resolve_sum was removed from SeriesAttribute Return 'sum' in _run_call_series. It fixed count_array_REPs(). Skip Series.sum(skipna) test Skip tests for DataFrame.sum() in new style
|
I have found solution (thanks to @kozlov-alexey for pointing to this). |
|
@PokhodenkoSA I started looking for this PR today and didn't understand - everything worked well. |
|
@shssf Thank you for merging it. @fschlimb could you please check that this feature is enabled in settings of the repository? |
Implemented Series.sum() via numpy.nansum().
Is it correct solution or should I implement it in another way?