GAA-UAM / scikit-fda

Functional Data Analysis Python package
https://fda.readthedocs.io
BSD 3-Clause "New" or "Revised" License
287 stars 51 forks source link

Handle ops between FDGrid and Python functions #458

Open matthieubulte opened 2 years ago

matthieubulte commented 2 years ago

Hi there πŸ‘‹

The goal of this PR is to be able to make it easier to do operations between FDGrids and normal python functions, like this

fd + (lambda x: x**2)

The feature seems to work and tests are still green but the PR probably needs a little bit more work to be mergeable (I don't think I manage well all possible grids since it's not clear to me what is possible to have as a grid), so I would be happy to get guidance on this.

Cheers!

codecov[bot] commented 2 years ago

Codecov Report

Merging #458 (84c644d) into develop (80f4f23) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop     #458   +/-   ##
========================================
  Coverage    80.48%   80.49%           
========================================
  Files           95       95           
  Lines         7442     7445    +3     
========================================
+ Hits          5990     5993    +3     
  Misses        1452     1452           
Impacted Files Coverage Ξ”
skfda/representation/grid.py 84.94% <100.00%> (+0.12%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 80f4f23...84c644d. Read the comment docs.

matthieubulte commented 2 years ago

I have added a commit to address most of your comments, let me know what you think!