def _write_array(self, array, filename):
    if (not self.compress):
        self.np.save(filename, array)
        allow_mmap = (not array.dtype.hasobject)
        container = NDArrayWrapper(os.path.basename(filename), type(array), allow_mmap=allow_mmap)
    else:
        filename += '.z'
        (_, init_args, state) = array.__reduce__()
        with open(filename, 'wb') as zfile:
            write_zfile(zfile, state[(- 1)], compress=self.compress)
        state = state[:(- 1)]
        container = ZNDArrayWrapper(os.path.basename(filename), init_args, state)
    return (container, filename)
def _write_array(self, array, filename):
    if (not self.compress):
        self.np.save(filename, array)
        allow_mmap = (not array.dtype.hasobject)
        container = NDArrayWrapper(os.path.basename(filename), type(array), allow_mmap=allow_mmap)
    else:
        filename += '.z'
        (_, init_args, state) = array.__reduce__()
        with open(filename, 'wb') as zfile:
            write_zfile(zfile, state[(- 1)], compress=self.compress)
        state = state[:(- 1)]
        container = ZNDArrayWrapper(os.path.basename(filename), init_args, state)
    return (container, filename)