Question about necessary X.shape
M-Colley opened this issue · comments
Hey,
in sr.py
, there is the following assertion assert len(X.shape) == 2, "X must have shape = (n_dim, data_size,)"
.
Why must X be in this shape?
Wouldn't it also work with 1-dimensional x and 1-dimensional y data?
Kind regards
Hi @M-Colley,
Sorry for the delayed response.
Yes the package works with 1D X and 1D y.
You can see an example of that here: https://github.com/WassimTenachi/PhySO/blob/main/demo/demo_damped_harmonic_oscillator/demo_damped_harmonic_oscillator.ipynb
The expected shape of X is (1000, 1) for 1000 datapoints in 1D and (1000,3) for 1000 data points in 3D for example.
This snippet of code just checks that the length of this shape is 2 as this is the expected format !
Kind regards.
Wassim
Please consider closing this issue if this answers your questions !
Ahhh I see, thanks!