Alternative with __array__ which removes the need for many special methods to be defined, but currently does not work for scalars.