In the course of refactoring I replaced np.asarray([0], dtype=dt) which created 1d single element array with functionally incorrect np.zeros([0], dtype=dt) which creates 1d no-elements array.
np.zeros([0], dtype=dt) should have been np.zeros(1, dtype=dt).