This issue pops up in a number of places in the sklearn library and anywhere sort is used. For ndim>0, you will get a The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
https://github.com/bluesky/bluesky-adaptive/blob/184c15645f5ecf660e3a21bb54d06758a98b9148/bluesky_adaptive/agents/sklearn.py#L163C5-L171C10
arr = np.array([
obs for ind, obs in sorted(
zip(self.independent_cache, self.observable_cache),
key=lambda pair: tuple(pair[0])
)
])