Open yb6599 opened 4 months ago
I think this is because BaseDifferentiation
subclasses don't all handle the axis
kwarg correctly, e.g.
ps.SINDyDerivative(kind="kalman")(X, t, axis=1)
# TypeError: __init__() got an unexpected keyword argument 'axis'
ps.FiniteDifference()(X, t)
# Error, expected, because no way that FiniteDifference knows to differentiate the second axis
ps.SpectralDerivative()(X, t)
# no error, but should, because Spectral is assuming it should differentiate the 0th axis
ps.FiniteDifference(axis=1)(X, t)
# no error, correct
ps.SmoothedFiniteDifference(axis=1)(X, t)
# correct, behaves like FiniteDifference
This is not an issue on pysindy version 1.7.6.dev278+g098d231, but is an issue on pysindy version 1.7.6.dev315+ga43e217
I am trying to differentiate pde data of shape (256, 100, 1) and len(t_train)=100 and I keep getting an error with the message "Invalid shape of X". Here is the simplified version of the code and the corresponding error.
Reproducing code example:
Error message:
PySINDy/Python version information:
1.7.6.dev215+g9c73768 3.11.7 (tags/v3.11.7:fa7a6f2, Dec 4 2023, 19:24:49) [MSC v.1937 64 bit (AMD64)]