[issue37946] Add the Bessel functions of the first and second kind to the math module

2019-08-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks for your detailed opinion, Mark. After reflecting on your arguments I 
agree that we should close this issue as rejected.

Thanks to everyone!

--
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37946] Add the Bessel functions of the first and second kind to the math module

2019-08-26 Thread Zackery Spytz


Zackery Spytz  added the comment:

> IMO this is the province of things like scipy.special. The Bessel functions 
> (and many others) are already easily available to users of the scientific 
> Python stack. I don't really see a need to have them in core Python.

I agree.

--
nosy: +ZackerySpytz

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37946] Add the Bessel functions of the first and second kind to the math module

2019-08-26 Thread Mark Dickinson


Mark Dickinson  added the comment:

Tim, Raymond: thoughts? I'm inclined to close this as rejected.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37946] Add the Bessel functions of the first and second kind to the math module

2019-08-26 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +tim.peters

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37946] Add the Bessel functions of the first and second kind to the math module

2019-08-26 Thread Mark Dickinson


Mark Dickinson  added the comment:

I'd also say that SciPy does this much better than the Python math library 
could ever hope to (without that math library effectively becoming a copy of 
scipy.special). It probably wouldn't be long before a user of the new Bessel 
functions also wanted Bessel functions of half-integer order (which turn up in 
statistics and in spherical harmonics problems), or of arbitrary complex order, 
or modified Bessel functions, or Airy functions and elliptic integrals, or ... 
For all those cases, SciPy has you covered, but extending the math module to 
cover all these things would be a lot of work and an unnecessary (IMO) 
duplication of effort.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37946] Add the Bessel functions of the first and second kind to the math module

2019-08-26 Thread Mark Dickinson


Mark Dickinson  added the comment:

They're not part of the C standard and they're not provided by all C libraries; 
we'd have to code our own and add thorough tests for the implementations (as we 
have for lgamma, gamma, erf, and other functions that may or may not exist in 
the platform libm). Making them optional is a no-go - you'd end up with code 
that works on some platforms but not on others. We've always provided fallback 
implementations in the past.

IMO this is the province of things like scipy.special. The Bessel functions 
(and many others) are already easily available to users of the scientific 
Python stack. I don't really see a need to have them in core Python.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37946] Add the Bessel functions of the first and second kind to the math module

2019-08-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> If they are provided by the C lib, I would love to see them exposed by Python.

Check PR 15497 for an initial version of exposing the libm functions if they 
are available.

> I don't know if they should be treated as optional/platform dependent, or if 
> we should provide an independent implementation.

Even if we want to provide an independent implementation, I would suggest to 
separate the two steps and starting to expose the underliying ones if they are 
available.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37946] Add the Bessel functions of the first and second kind to the math module

2019-08-25 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

If they are provided by the C lib, I would love to see them exposed by Python.

If they aren't, I don't know if they should be treated as optional/platform 
dependent, or if we should provide an independent implementation. I guess the 
easy way is to just make it optional.

--
nosy: +steven.daprano

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37946] Add the Bessel functions of the first and second kind to the math module

2019-08-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +15187
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15497

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37946] Add the Bessel functions of the first and second kind to the math module

2019-08-25 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

After repeatedly having to add 3rd party libraries only for the these functions 
or having to implement them myself quick and dirty based on numerical 
integration, I suggest add the Bessel functions of the first and second kind to 
the math module. These functions tend to appear a lot (but not restricted to) 
when evaluating systems that are defined on cylindrical geometries, 
restrictions or approximations (like the proximate solution to Kepler's 
equation as a truncated Fourier sine series) and many other special functions 
can be described as series involving them.

Based on the fact that many libc implementations include them I think the 
cost-benefit of exposing them when available is acceptable.

--
components: Extension Modules
messages: 350477
nosy: mark.dickinson, pablogsal, rhettinger
priority: normal
severity: normal
status: open
title: Add the Bessel functions of the first and second kind to the math module
type: enhancement
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com