ValueError: data copying was not requested by copy=None but it was required to get to double floating point precision

When i use Common spatial pattern
i get this error
ValueError: data copying was not requested by copy=None but it was required to get to double floating point precision
Here is code

scaler=mne.decoding.Scaler(scalings='mean')
csp=mne.decoding.CSP()                   
clf=LogisticRegression(solver='lbfgs')

x_train_scaled=scaler.fit_transform(x_train)
x_test_scaled=scaler.transform(x_test)

x_train_csp=csp.fit_transform(x_train_scaled,y_train)
x_test_csp=csp.transform(x_test_scaled,y_test)

Hello, we’d need to see the entire traceback to see where the issue actually occurs.

I assume that you tinkered with the dtype of your input data? This is bound to create problems and should therefore be avoided.

Best wishes,
Richard

Yes, i am changing dtype to float16 to fit in memory

Don’t do that then :woman_shrugging: It’s not supported.

have you solved this problem? I have the same problem.

Hello @Bally and welcome to the forum!

When posting a new topic, please fill in all the requested information. We created the New Topic template to make it easier for other users to help, not to annoy those who have a question and are seeking help.

Please open a new topic and fill in all the requested information.

Thanks,
Richard

@Bally I have to apologize, this went into the wrong thread. Your question was indeed a followup to this existing thread. Things got mixed up at my end. Sorry for that!

The problem here was never resolved because OP tried to do something that is not supported. If you believe you’re witnessing a related problem, can you please open a new topic and provide all the information requested in the new topic template?

Thank you very much, and again, sorry for the mixup. I realize this probably made me appear very rude.

Best wishes,
Richard