Would be nice to be able to operate directly on `RawArrays` instead, even if it means casting to `ndarray` types as intermediates.