Closed chaous closed 8 months ago
Thanks for your question. Please format your code with backticks, e.g. ```
done
Thanks for your question. Please format your code with backticks, e.g. ```
Ah, yeah, PDELibrary
has only recently been able to accept another library as function_library
argument. Before that, you had to manually specify library_functions
as a list of callables. It looks like you've tried to set both, which won't work on any version.
You can check help(PDELibrary)
for the arguments allowed by 1.7.5.
Ok, I just tried to run the tutorial
@chaous did this solve your problem?
Yes, I was thank you
Sorry. I tried the same tutorial and got the same error. After reading your comments, I still do not know how to fix it. seems function_library is not defined here
I ran code from git but I'm not sure
I try to run tutorial 10 and get TypeError: PDELibrary.init() got an unexpected keyword argument 'function_library'. For some reason ps.PDELibrary doesn't have 'function_library'. I tried to install dev and got WARNING: pysindy 1.7.5 does not provide the extra 'dev'
Reproducing code example:
Error message:
Cell In[8], line 10 4 u = ps.AxesArray(np.ones((len(x) len(t), 2)),{"ax_coord":1}) 6 # Define PDE library that is quadratic in u, 7 # and second-order in spatial derivatives of u. 8 # library_functions = [lambda x: x, lambda x: x x] 9 # library_function_names = [lambda x: x, lambda x: x + x] ---> 10 pde_lib = ps.PDELibrary( 11 # library_functions=library_functions, 12 function_library=ps.PolynomialLibrary(degree=2,include_bias=False), 13 derivative_order=2, 14 spatial_grid=x, 15 ).fit([u]) 16 print("2nd order derivative library: ") 17 print(pde_lib.get_feature_names())
TypeError: PDELibrary.init() got an unexpected keyword argument 'function_library'
PySINDy/Python version information:
1.7.5 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]