[Numpy-discussion] next NumPy triage meeting - September 4th, 2024 at 6 pm UTC

2024-09-01 Thread Inessa Pawson
The next NumPy triage meeting will be held this Wednesday, September 4th at
6 pm UTC. This is a meeting where we synchronously triage prioritized PRs
and issues.
Join us via Zoom:
https://numfocus-org.zoom.us/j/82096749952?pwd=MW9oUmtKQ1c3a2gydGk1RTdYUUVXZz09
.
Everyone is welcome to attend and contribute to a conversation.
Please notify us of issues or PRs that you’d like to have reviewed by
adding a GitHub link to them in the meeting agenda:
https://hackmd.io/68i_JvOYQfy9ERiHgXMPvg.

-- 
Cheers,
Inessa

Inessa Pawson
GitHub: inessapawson
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Re: Adding `P.coef_natural` property to polynomials

2024-09-01 Thread Rakshit Singh
Best Wishes

I am really hesitant of changing the api, some packages might be dependent
on it.

Regards
Rakshit Kr. Singh

On Sun, Sep 1, 2024, 5:54 PM oc-spam66--- via NumPy-Discussion <
numpy-discussion@python.org> wrote:

> I can summarize the different possibilities/proposals:
> (A) Create new properties: add a `P.coef_natural` property, with a
> suitable documentation ; maybe also add a `P.coef_internal` property. There
> would be no change to the existing code (only addition of properties).
> (B) Change `P.coef` attribute into a property, with a suitable
> documentation. Hide `P.coef` attribute into `P._coef` (change existing
> code). Do not create more properties (unlike A).
>
> - About (A), I don't think that adding `P.coef_natural` would add a risk.
> - About (B), it may be appreciated that the API does not change (does not
> occupy more namespace)
> - Both (A) and (B) would help basic users to get out of the `P.coef`
> attribute confusion.
>
> Side remark (not important):
> > "natural" coefficients make very little if any sense for some of the
> other polynomial subclasses, such as Chebyshev -- for those, there's
> nothing natural about them!
> Are you sure? Can they not be the weights at different order of
> approximation of a solution?
> ___
> NumPy-Discussion mailing list -- numpy-discussion@python.org
> To unsubscribe send an email to numpy-discussion-le...@python.org
> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
> Member address: rakshitsingh...@gmail.com
>
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Re: Adding `P.coef_natural` property to polynomials

2024-09-01 Thread oc-spam66--- via NumPy-Discussion
I can summarize the different possibilities/proposals:
(A) Create new properties: add a `P.coef_natural` property, with a suitable 
documentation ; maybe also add a `P.coef_internal` property. There would be no 
change to the existing code (only addition of properties).
(B) Change `P.coef` attribute into a property, with a suitable documentation. 
Hide `P.coef` attribute into `P._coef` (change existing code). Do not create 
more properties (unlike A).

- About (A), I don't think that adding `P.coef_natural` would add a risk.
- About (B), it may be appreciated that the API does not change (does not 
occupy more namespace)
- Both (A) and (B) would help basic users to get out of the `P.coef` attribute 
confusion.

Side remark (not important):
> "natural" coefficients make very little if any sense for some of the other 
> polynomial subclasses, such as Chebyshev -- for those, there's nothing 
> natural about them!
Are you sure? Can they not be the weights at different order of approximation 
of a solution?
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com


[Numpy-discussion] Re: Adding `P.coef_natural` property to polynomials

2024-09-01 Thread Charles R Harris
On Sun, Sep 1, 2024 at 6:48 AM Rakshit Singh 
wrote:

> Best Wishes
>
> I am really hesitant of changing the api, some packages might be dependent
> on it.
>
> Regards
> Rakshit Kr. Singh
>
> On Sun, Sep 1, 2024, 5:54 PM oc-spam66--- via NumPy-Discussion <
> numpy-discussion@python.org> wrote:
>
>> I can summarize the different possibilities/proposals:
>> (A) Create new properties: add a `P.coef_natural` property, with a
>> suitable documentation ; maybe also add a `P.coef_internal` property. There
>> would be no change to the existing code (only addition of properties).
>> (B) Change `P.coef` attribute into a property, with a suitable
>> documentation. Hide `P.coef` attribute into `P._coef` (change existing
>> code). Do not create more properties (unlike A).
>>
>> - About (A), I don't think that adding `P.coef_natural` would add a risk.
>> - About (B), it may be appreciated that the API does not change (does not
>> occupy more namespace)
>> - Both (A) and (B) would help basic users to get out of the `P.coef`
>> attribute confusion.
>>
>> Side remark (not important):
>> > "natural" coefficients make very little if any sense for some of the
>> other polynomial subclasses, such as Chebyshev -- for those, there's
>> nothing natural about them!
>> Are you sure? Can they not be the weights at different order of
>> approximation of a solution?
>> ___
>> NumPy-Discussion mailing list -- numpy-discussion@python.org
>> To unsubscribe send an email to numpy-discussion-le...@python.org
>> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
>> Member address: rakshitsingh...@gmail.com
>>
> ___
> NumPy-Discussion mailing list -- numpy-discussion@python.org
> To unsubscribe send an email to numpy-discussion-le...@python.org
> https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
> Member address: charlesr.har...@gmail.com


Chebyshev polynomials have two important properties over the interval [-1,
1]:

   1. They are equiripple, consequently the coefficients of high power fits
   are a good approximation of the maximum error if the series is truncated at
   that point, i.e., they provide something close to an min-max fit.
   2.  High power fits are practical because the polynomials are more
   independent (in the L2 norm). The design matrix is generally
   well-conditioned.

Chebyshev polynomials are quite wonderful, but only if the domain of the
data is in the range [-1, 1]. Similar arguments apply to Legendre
polynomials, but in that case the coefficients approximate the L2 error
when the series is truncated and properly normalized. In both cases, the
coefficients are a good guide to the power needed to fit the underlying
data with minimum influence from noise.

Chuck
___
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com