python libraries
|
04-22-2021, 06:58 PM
Post: #12
|
|||
|
|||
RE: python libraries
(04-22-2021 04:24 PM)robmio Wrote: Although the "HP PRIME" G2 calculator is very fast, when it calculates the integral to obtain the "Studentize q Rance distribution CDF" function, it takes about 33 seconds. Is there a way, with Python, to reduce the computation time of this function?I don't think that any Python scientific library is faster than my own adaptive numeric integration algorithm with the same accuracy (for multiple integrals Monte-Carlo like methods will be much faster but much less accurate). You can try to optimize your call. For example if your bounds are infinity (something that is impossible with a non-CAS language like Python), the CAS will do a change of variable to have finite boundaries, and this might slow down the computation compared to taking reasonable finite boundaries, e.g. z=-10.0 to 10.0 in the inner integral. You could try: Code:
Of course this will be much slower than a good implementation of a special function using for example series expansion for some range of arguments, and asymptotic expansion for other ranges, or Tchebyscheff polynomial approximations, etc. And MicroPython is not Python, porting any (large) library to MicroPython to the Prime would require work. It's much easier to port a C library with the same functionnalities, for example blas+lapack instead of numpy. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
python libraries - robmio - 04-20-2021, 11:49 AM
RE: python libraries - jonmoore - 04-20-2021, 05:21 PM
RE: python libraries - parisse - 04-21-2021, 02:20 PM
RE: python libraries - cyrille de brébisson - 04-22-2021, 11:17 AM
RE: python libraries - jonmoore - 04-22-2021, 12:44 PM
RE: python libraries - toml_12953 - 04-22-2021, 01:28 PM
RE: python libraries - John Keith - 04-22-2021, 04:11 PM
RE: python libraries - roadrunner - 04-22-2021, 01:07 PM
RE: python libraries - parisse - 04-22-2021, 03:07 PM
RE: python libraries - jonmoore - 04-22-2021, 04:38 PM
RE: python libraries - robmio - 04-22-2021, 04:24 PM
RE: python libraries - parisse - 04-22-2021 06:58 PM
RE: python libraries - jonmoore - 04-23-2021, 05:13 AM
RE: python libraries - parisse - 04-23-2021, 05:51 AM
RE: python libraries - jonmoore - 04-23-2021, 09:23 AM
RE: python libraries - parisse - 04-23-2021, 10:54 AM
RE: python libraries - jonmoore - 04-23-2021, 11:08 AM
|
User(s) browsing this thread: 5 Guest(s)