EconForge / interpolation.py

BSD 2-Clause "Simplified" License
123 stars 35 forks source link

WIP: Add derivatives of complete polynomials #16

Closed cc7768 closed 7 years ago

cc7768 commented 7 years ago

Add derivatives for complete polynomials up to order 5.

This is mostly done. I've added some tests for the derivative functions, but found one last bug that needs to be addressed. In particular the biggest one is the way that I'm computing the derivatives doesn't work if any of the elements of the point are 0.0 because they sometimes get raised to the -1. This should only take 5-10 minutes to fix and will do it in next few days.

Also note that I've commented out the cache=True argument for JIT compiling for the time being. See https://github.com/QuantEcon/QuantEcon.py/issues/285 for more details.

@sglyon @albop

sglyon commented 7 years ago

Hey @albop do you think this is a good candidate for more of your temptia + numba @generated magic?

albop commented 7 years ago

So does the cache=True thing explain why the tests don't pass ? I'd like to look a bit more in detail to see how hard it would be to implement complete products of arbitrary orthogonal polynomial bases. This would go into linear_basis. In the meantime, this could be merged in master. Tell me when you think it's ready.

sglyon commented 7 years ago

@albop if you do figure that out let me know. Is like to see an efficient implementation of that!

cc7768 commented 7 years ago

Hi @albop. Let me know if you have any comments otherwise, I think this is ready to merge.