Use x_dot
kwarg in model.fit
in PDEs with WeakPDELibrary()
#450
Labels
good first issue
Good for newcomers
x_dot
kwarg in model.fit
in PDEs with WeakPDELibrary()
#450
SINDy.fit()
doesn't accept bare numpy array asx_dot
.Thanks to @georgemilosh for finding!
SINDy.fit()
without anx_dot
argument creates it by differentiatingx
. So internally, it's expecting anAxesArray
in order to runconcat_sample_axis
. However, we also accept users providingx_dot
as an argument. When we do, theAxesArray
object is never created. This is because_comprehend_and_validate_inputs
only adds axes tox
andu
, notx_dot
. Solution is probably just addingx_dot
to that function and adding a test forfit
called withx_dot
.Discussed in #444
Originally posted by georgemilosh December 27, 2023
So it seems that the PDELibrary does not throw an error, although I have to manually flatten u_dot:
Here flatten u helps. So how can I provide my own x_dot info for PDEs?
My package version:
0.1.dev1618+g694c904.d20231219 3.8.18 | packaged by conda-forge | (default, Oct 10 2023, 15:44:36)
[GCC 12.3.0]
The text was updated successfully, but these errors were encountered: