from ast import literal_eval
x="""[[0.82080925 0.95953757 0.89595376 0.97109827 0.90116279]
[0.90667808 0.91780822 0.90239726 0.89974293 0.9143102 ]
[0.88695652 0.89565217 0.92982456 0.92982456 0.92105263]
[0.84782609 0.86956522 0.7826087 0.84444444 0.91111111]
[0.8 0.8 0.7 0.88333333 0.86666667]
[0.92222222 0.92222222 0.93333333 0.95555556 0.94444444]
[1. 0.96666667 0.9 0.96666667 0.93333333]
[0.97369068 0.98180477 0.9771274 0.97909493 0.97442204]
[1. 0.97777778 0.97777778 0.97777778 0.97777778]
[0.99213287 0.98688811 0.98951049 0.99125874 0.98776224]
[0.99388112 0.99344406 0.99562937 0.99606643 0.99519231]
[0.93337731 0.91029024 0.94327177 0.88778878 0.88976898]
[0.77 0.765 0.765 0.755 0.765 ]
[0.75250836 0.77725753 0.79451138 0.74364123 0.76639893]
[0.94782609 0.94891304 0.95271739 0.95541055 0.94453507]
[0.95 0.96428571 0.97142857 0.9547619 0.96428571]
[0.82222222 0.86666667 0.81818182 0.88636364 0.88636364]
[0.81176471 0.90588235 0.89411765 0.81176471 0.82142857]
[0.99361314 0.99635036 0.99178832 0.99726027 1. ]
[0.97368421 0.97974342 0.97501688 0.96623903 0.98109386]
[0.77142857 0.8 0.79885057 0.82758621 0.7816092 ]
[0.95804196 0.98601399 0.97902098 0.97902098 0.94366197]
[0.95348837 0.95348837 0.95348837 0.97619048 1. ]
[0.72294372 0.64718615 0.69264069 0.72017354 0.72234273]
[0.82025678 0.78601997 0.81597718 0.82881598 0.80571429]] """
y="""[[0.9132948 0.87283237 0.87861272 0.83815029 0.84883721]
[0.89554795 0.8989726 0.89297945 0.88860326 0.90488432]
[0.92173913 0.88695652 0.9122807 0.93859649 0.9122807 ]
[0.91304348 0.82608696 0.89130435 0.84444444 0.93333333]
[0.81666667 0.85 0.78333333 0.86666667 0.88333333]
[0.94444444 0.95555556 0.91111111 0.91111111 0.93333333]
[1. 0.96666667 0.9 0.96666667 0.93333333]
[0.95279075 0.95918367 0.95696016 0.94564683 0.96261682]
[0.98888889 0.98888889 0.97777778 0.98888889 0.98888889]
[0.97902098 0.96853147 0.9798951 0.98164336 0.9798951 ]
[0.99038462 0.98339161 0.98907343 0.9916958 0.9881993 ]
[0.91358839 0.92612137 0.93139842 0.90825083 0.91881188]
[0.775 0.805 0.85 0.755 0.81 ]
[0.94715719 0.96120401 0.96385542 0.95046854 0.95448461]
[0.92880435 0.93858696 0.93695652 0.94888526 0.94127243]
[0.98571429 0.96666667 0.97619048 0.94285714 0.98571429]
[0.82222222 0.93333333 0.90909091 0.79545455 0.86363636]
[0.91764706 0.92941176 0.91764706 0.91764706 0.91666667]
[0.97718978 0.97718978 0.96624088 0.97077626 0.9716895 ]
[0.97300945 0.97366644 0.96556381 0.96961512 0.972316 ]
[0.74857143 0.73714286 0.7183908 0.72413793 0.75287356]
[0.94405594 0.97202797 0.97902098 0.95104895 0.95774648]
[0.90697674 1. 1. 1. 1. ]
[0.77056277 0.71212121 0.73809524 0.72885033 0.7462039 ]
[0.81740371 0.77746077 0.80884451 0.82738944 0.83571429]] """
x = re.sub(r"([^[])\s+([^]])", r"\1, \2", x)
y = re.sub(r"([^[])\s+([^]])", r"\1, \2", y)
x = np.array(literal_eval(x))
y = np.array(literal_eval(y))
print(x)
print(y)
probs= two_on_multiple(x, y, rope=0, plot=False, names=['x', 'y'])```
# Output
```ValueError Traceback (most recent call last)
<ipython-input-15-71d98cb2e0f9> in <module>
60 print(y)
61
---> 62 probs= two_on_multiple(x, y, rope=0, plot=False, names=['x', 'y'])
~/anaconda3/envs/bayesian/lib/python3.7/site-packages/baycomp/multiple.py in two_on_multiple(x, y, rope, runs, names, plot, **kwargs)
485 else:
486 test = SignedRankTest
--> 487 return call_shortcut(test, x, y, rope, names=names, plot=plot, **kwargs)
~/anaconda3/envs/bayesian/lib/python3.7/site-packages/baycomp/utils.py in call_shortcut(test, x, y, rope, plot, names, *args, **kwargs)
18
19 def call_shortcut(test, x, y, rope, *args, plot=False, names=None, **kwargs):
---> 20 sample = test(x, y, rope, *args, **kwargs)
21 if plot:
22 return sample.probs(), sample.plot(names)
~/anaconda3/envs/bayesian/lib/python3.7/site-packages/baycomp/multiple.py in __new__(cls, x, y, rope, nsamples, **kwargs)
151
152 def __new__(cls, x, y, rope=0, *, nsamples=50000, **kwargs):
--> 153 return Posterior(cls.sample(x, y, rope, nsamples=nsamples, **kwargs))
154
155 @classmethod
~/anaconda3/envs/bayesian/lib/python3.7/site-packages/baycomp/multiple.py in sample(cls, x, y, rope, runs, lower_alpha, upper_alpha, lower_beta, upper_beta, upper_sigma, chains, nsamples)
443
444 rope, diff = scaled_data(x, y, rope)
--> 445 mu, stdh, nu = run_stan(diff)
446 samples = np.empty((len(nu), 3))
447 for mui, std, df, sample_row in zip(mu, stdh, nu, samples):
~/anaconda3/envs/bayesian/lib/python3.7/site-packages/baycomp/multiple.py in run_stan(diff)
426
427 def run_stan(diff):
--> 428 stan_data = prepare_stan_data(diff)
429
430 # check if the last pickled result can be reused
~/anaconda3/envs/bayesian/lib/python3.7/site-packages/baycomp/multiple.py in prepare_stan_data(diff)
401 if np.var(sample) == 0:
402 sample[:nscores_2] = np.random.uniform(-rope, rope, nscores_2)
--> 403 sample[nscores_2:] = -sample[:nscores_2]
404
405 std_within = np.mean(np.std(diff, axis=1)) # may be different from std_diff!
ValueError: could not broadcast input array from shape (2) into shape (3)```