in dict_minimize/torch_api.py [0:0]
def _to_np(X): Xn = X.detach().numpy() assert Xn.dtype.kind == "f" return Xn