more sane ndarrayfactory pattern