-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help in figuring out the cause behind TypeError while fitting with tensor libraries #446
Comments
Here is the detailed error for your reference : pysindy_error.txt pysindy_error.txt
|
This seems like an issue with I tried running your code (adding import numpy
x_train = np.arange(2* 251).reshape((251,2))
u_train = np.arange(2* 251).reshape((251,2)) ) but I don't know what |
Excuse me. I have hurriedly uploaded it in the wrong format. PFA the error here. error
<\details> |
@Jacob-Stevens-Haas Is this an error from my end, or is there an issue with the library? |
When you typed lib_func = [lambda vx: 1/vx,
lambda vx: 1/vx^2] Did you mean to do bitwise XOR ( I'm going to assume exponentiation, but there's still another error. The SINDy object needs feature names for both the state variables and control variables. Thus, model = ps.SINDy(feature_names=states, ... should be: model = ps.SINDy(feature_names=states + inputs, ...) Correcting this and the exponentiation gives:
|
So not specifically a bug, but our documentation of the Also, if the change suggested in #387 is approved, this may be clearer. |
Thanks, it runs without any error after adding inputs in feature_names. |
I am getting an error while trying to fit a linear parameter-varying model that looks like this:
The error :
Note that the
x_train
andu_train
are numpy ndarrays of 251x2 dimension with float64 elements. Here is the whole code.Can you please help in figuring out the problem here?
Reproducing code example:
Error message:
` TypeError: ufunc 'bitwise_xor' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''`
PySINDy/Python version information:
Using python 3.9.15 and pysindy version: 1.7.5
@Ipsitakoley
@Aditya16828
The text was updated successfully, but these errors were encountered: