-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
numpy.random.mtrand.RandomState.shuffle ValueError: array is read-only #48
Comments
Hello @jmrichardson, could you print out the version of numpy and arfs you are using? import arfs
print(f"numpy {np.__version__} and ARFS {arfs.__version__}") As the error says, the array is read-only. It might be due how you instantiate Are you able to run the timeseries tuto? I prefer not to change Let me know if that works, thanks for reaching out |
Hi @ThomasBury , Thank you for the fast reply!
It fails on the tutorial. I just pasted the tutorial below in my python terminal and got the same error:
My X and y are pandas dataframe and series respectively. Ive added a .copy() to both X and y and got the same error: feat_selector.fit(X.copy(), y.copy(), sample_weight=None) Not sure what is different in our environments which could cause the issue? |
Alright, we can try two things:
Then run the tuto using this python kernel. If it still fails, try to change the numpy flag (see the link in my previous message) If none works, I'll need to investigate further. I just tested on two different laptops with fresh env, it works fine (linux and windows, numpy 1.26 and 2.01) 🤞 |
Hi, creating a new environment did work. I tested both numpy 1.26 and 2.01 on my windows PC and no issue. There must be something else in my other environment that is conflicting. No worries, I will just create a fork and make the changes I need and hopefully have more time later to pin point the issue. Thanks for your help :) |
Hi,
I am testing GrootCV and got the following error:
Here is the respective code:
In allreveant.py line 1696, I changed
np.random.shuffle(X_shadow[c].values)
to
X_shadow[c] = np.random.permutation(X_shadow[c].values)
It seems to work now. Hoping you could have a look.
Thanks!
The text was updated successfully, but these errors were encountered: