Added workaround for bug when allocating numpy.ndarray when its dtype.itemsize is zero.