ValueError Traceback (most recent call last)
/astro/mark/casa/casa-stable-4.7.74/lib/python2.7/casapy.py in <module>()
1
2
----> 3
4
5
/astro/mark/.casa/lib/python2.7/site-packages/corner/corner.pyc in corner(xs, bins, range, weights, color, smooth, smooth1d, labels, label_kwargs, show_titles, title_fmt, title_kwargs, truths, truth_color, scale_hist, quantiles, verbose, fig, max_n_ticks, top_ticks, use_math_text, hist_kwargs, **hist2d_kwargs)
254 # Plot quantiles if wanted.
255 if len(quantiles) > 0:
--> 256 qvalues = quantile(x, quantiles, weights=weights)
257 for q in qvalues:
258 ax.axvline(q, ls="dashed", color=color)
/astro/mark/.casa/lib/python2.7/site-packages/corner/corner.pyc in quantile(x, q, weights)
411
412 if weights is None:
--> 413 return np.percentile(x, 100.0 * q)
414 else:
415 weights = np.atleast_1d(weights)
/astro/mark/casa/casa-stable-4.7.74/lib/python2.7/site-packages/numpy/lib/function_base.pyc in percentile(a, q, axis, out, overwrite_input)
3077 a = np.asarray(a)
3078
-> 3079 if q == 0:
3080 return a.min(axis=axis, out=out)
3081 elif q == 100:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
I've recently moved institution and so am working on a fresh set-up and initially thought that I hadn't set something up correctly. But then it occurred to me to check if there had been any recent changes to corner. Sure enough, some changes were made 9 days ago including this:
- return np.percentile(x, [100. * qi for qi in q])
+ return np.percentile(x, 100.0 * q)
I suspect this is the source of the error. Was there a good reason for this change?