On the use of adding an expfit class in or next to the polynomial module

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

On the use of adding an expfit class in or next to the polynomial module

Swan BOSC
Hello people !
First-of-all, thank you for your great service to the Python community.

I'm working for a project on porting some Octave code base towards Python. As you can imagine, it is a lot of fun, but I sometimes come across functions that are not (yet ?) available in the mighty NumPy package.

Namely, the expfit function, as presented here (https://octave.sourceforge.io/optim/function/expfit.html) doesn't seem to exist. I'm currently building a replacement for it in my words (keywords I mean ;) ) but maybe a better solution would be to contribute some code into NumPy.

AFAIK, the preferred way to fit a Polynomial nowadays is to call numpy.polynomial.polynomial.Polynomial.
Do you think that a class for `Exponential` based on that one would be an interesting addition to NumPy ?

Thanks in advance,

Swan BOSC.



_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: On the use of adding an expfit class in or next to the polynomial module

Stefan van der Walt
Hi there,

Thanks for reaching out.

On Wed, Jan 27, 2021, at 04:24, Swan BOSC wrote:
Namely, the expfit function, as presented here (https://octave.sourceforge.io/optim/function/expfit.html) doesn't seem to exist. I'm currently building a replacement for it in my words (keywords I mean ;) ) but maybe a better solution would be to contribute some code into NumPy.

AFAIK, the preferred way to fit a Polynomial nowadays is to call numpy.polynomial.polynomial.Polynomial.
Do you think that a class for `Exponential` based on that one would be an interesting addition to NumPy ?

I think Prony's method would probably be a better fit for `scipy.signal`.  Please be mindful not to translate this from existing GPL code, but to implement it afresh.

Best regards,
Stéfan

_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: On the use of adding an expfit class in or next to the polynomial module

Swan BOSC
Hi Stefan,

Thanks for the advice and for the redirection to scipy !
I will create an implementation of it there

Swan BOSC.


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, January 29th, 2021 at 07:49, Stefan van der Walt <[hidden email]> wrote:
Hi there,

Thanks for reaching out.

On Wed, Jan 27, 2021, at 04:24, Swan BOSC wrote:
Namely, the expfit function, as presented here (https://octave.sourceforge.io/optim/function/expfit.html) doesn't seem to exist. I'm currently building a replacement for it in my words (keywords I mean ;) ) but maybe a better solution would be to contribute some code into NumPy.

AFAIK, the preferred way to fit a Polynomial nowadays is to call numpy.polynomial.polynomial.Polynomial.
Do you think that a class for `Exponential` based on that one would be an interesting addition to NumPy ?

I think Prony's method would probably be a better fit for `scipy.signal`.  Please be mindful not to translate this from existing GPL code, but to implement it afresh.

Best regards,
Stéfan


_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion