Open Mv77 opened 1 year ago
Hmm, it doesn't look immediately obvious. I need to think a little bit. Will get back to it later this week.
@Mv77, I have, I believe found the source of the error and fixed it in master. Do you want to check ?
Actually, I haven't. The bug is still there...
Hey @albop , thanks for looking into it.
I ran the test anyway and yes, it looks like the error is still there.
Hi @albop,
I have been working on enhancing our
HARK
wrapper ofinterpolation
to work with functions of multiple outputs, $f:\mathbb{R}^n\rightarrow \mathbb{R}^m, m>1$. I have run into a strange behavior where callingeval_linear
with parameters representing a function of multiple outputs can return interpolations of a single output. Say, I am approximating[g(x), h(x)]
and it might only returng(x)
.I created the following script that reproduces the error
The script interpolates a 2-d function a thousand times and raises an error if the output is not of the expected shape.
Here is the output I get
There are various strange things about the behavior of this script:
if True:
below# Evaluate 1d interpolator
toif False:
the script completes the 1000 iterations without issues.xto.LINEAR
lines, the script completes the 1000 iterations without issues.This makes me think that what is going on is some bug in the overloading of functions with different inputs, but that only explains part of the strange behaviors above.
Do you know what might be going on? I'd be happy to help fix/test this issue.