Open plankter opened 2 months ago
Hey,
Can you please provide a minimal code example to reproduce the error? I'm not able to reproduce it with the example from Pingouin's documentation.
Can you also please check whether the following works:
ss_resid = aov["SS"].iloc[-1]
all_effsize = aov["SS"].apply(lambda x: x / (x + ss_resid)).to_numpy(copy=True)
all_effsize[-1] = np.nan
If so, please feel free to submit a quick PR.
Thanks, Raphael
Hi,
First, thank you for a very useful library!
With the following versions installed:
Python: 3.12.3 Pingouin: 0.5.4 Pandas: 2.2.2 Numpy: 1.26.4
In the file parametric.py [lines: 1739, 1743] there is a problem with ancova(...) function. This code tries to assign a value to read-only numpy array:
ValueError: assignment destination is read-only
If one prints flags of all_effsize array with print(all_effsize.flags), the output is the following:
Making a copy of the array before assignment fixes the problem:
Best regards, Anton