Victor Eijkhout skrev:
> How do I get that shape to be the same in both cases?
>x = (x,) if np.isscalar(x) else x
Scalars are not iterable, which is why
array([cos(x),sin(x),tan(x)])
becomes a vector if x is scalar.