So basically it is just doc string for class WeakPDELibrary(BaseFeatureLibrary): that seems to be inconsistent with the current setup. It says that lib.transform(x) would generate array of the same shape as the inpux x, but it is actually the sampled shape of x (which is governed by K). Also if I run this example with x that is 3 by 2 the command takes forever, so I changed it a bit:
Reproducing code example:
import numpy as np
from pysindy.feature_library import WeakPDELibrary
t = np.arange(0, 10, .5)
x = np.random.randint(0,3,(t.shape[0],2))
functions = [lambda x : np.exp(x), lambda x,y : np.sin(x+y)]
lib = WeakPDELibrary(library_functions=functions,spatiotemporal_grid=t,K=50).fit(x)
lib.transform(x).shape
So there is no error but it would help if more up to date doc strings and examples were provided.
PySINDy/Python version information:
0.1.dev1618+g694c904.d20231219 3.8.18 | packaged by conda-forge | (default, Oct 10 2023, 15:44:36)
[GCC 12.3.0]
So basically it is just doc string for
class WeakPDELibrary(BaseFeatureLibrary):
that seems to be inconsistent with the current setup. It says thatlib.transform(x)
would generate array of the same shape as the inpuxx
, but it is actually the sampled shape ofx
(which is governed byK
). Also if I run this example withx
that is 3 by 2 the command takes forever, so I changed it a bit:Reproducing code example:
So there is no error but it would help if more up to date doc strings and examples were provided.
PySINDy/Python version information: