def _write_entry(self, number, data, cdf_type, dims, elements):
    'Write an Entry to this Attr.\n\n        @param number: number of Entry to write\n        @type number: int\n        @param data: data to write\n        @param cdf_type: the CDF type to write, from :py:mod:`pycdf.const`\n        @param dims: dimensions of L{data}\n        @type dims: list\n        @param elements: number of elements in L{data}, 1 unless it is a string\n        @type elements: int\n        '
    if (len(dims) == 0):
        n_write = 1
    else:
        n_write = dims[0]
    if (cdf_type in (const.CDF_CHAR.value, const.CDF_UCHAR.value)):
        data = numpy.require(data, requirements=('C', 'A', 'W'), dtype=numpy.dtype(('S' + str(elements))))
        n_write = elements
    elif (cdf_type == const.CDF_EPOCH16.value):
        if (not self._raw):
            try:
                data = lib.v_datetime_to_epoch16(data)
            except AttributeError:
                pass
        data = numpy.require(data, requirements=('C', 'A', 'W'), dtype=numpy.float64)
    elif (cdf_type == const.CDF_EPOCH.value):
        if (not self._raw):
            try:
                data = (lib.v_datetime_to_epoch(data),)
            except AttributeError:
                pass
        data = numpy.require(data, requirements=('C', 'A', 'W'), dtype=numpy.float64)
    elif (cdf_type == const.CDF_TIME_TT2000.value):
        if (not self._raw):
            try:
                data = lib.v_datetime_to_tt2000(data)
            except AttributeError:
                pass
        data = numpy.require(data, requirements=('C', 'A', 'W'), dtype=numpy.int64)
    elif (cdf_type in lib.numpytypedict):
        data = numpy.require(data, requirements=('C', 'A', 'W'), dtype=lib.numpytypedict[cdf_type])
    else:
        raise CDFError(const.BAD_DATA_TYPE)
    self._call(const.SELECT_, self.ENTRY_, ctypes.c_long(number), const.PUT_, self.ENTRY_DATA_, ctypes.c_long(cdf_type), ctypes.c_long(n_write), data.ctypes.data_as(ctypes.c_void_p))
Write an Entry to this Attr.

@param number: number of Entry to write
@type number: int
@param data: data to write
@param cdf_type: the CDF type to write, from :py:mod:`pycdf.const`
@param dims: dimensions of L{data}
@type dims: list
@param elements: number of elements in L{data}, 1 unless it is a string
@type elements: int
def _write_entry(self, number, data, cdf_type, dims, elements):
    'Write an Entry to this Attr.\n\n        @param number: number of Entry to write\n        @type number: int\n        @param data: data to write\n        @param cdf_type: the CDF type to write, from :py:mod:`pycdf.const`\n        @param dims: dimensions of L{data}\n        @type dims: list\n        @param elements: number of elements in L{data}, 1 unless it is a string\n        @type elements: int\n        '
    if (len(dims) == 0):
        n_write = 1
    else:
        n_write = dims[0]
    if (cdf_type in (const.CDF_CHAR.value, const.CDF_UCHAR.value)):
        data = numpy.require(data, requirements=('C', 'A', 'W'), dtype=numpy.dtype(('S' + str(elements))))
        n_write = elements
    elif (cdf_type == const.CDF_EPOCH16.value):
        if (not self._raw):
            try:
                data = lib.v_datetime_to_epoch16(data)
            except AttributeError:
                pass
        data = numpy.require(data, requirements=('C', 'A', 'W'), dtype=numpy.float64)
    elif (cdf_type == const.CDF_EPOCH.value):
        if (not self._raw):
            try:
                data = (lib.v_datetime_to_epoch(data),)
            except AttributeError:
                pass
        data = numpy.require(data, requirements=('C', 'A', 'W'), dtype=numpy.float64)
    elif (cdf_type == const.CDF_TIME_TT2000.value):
        if (not self._raw):
            try:
                data = lib.v_datetime_to_tt2000(data)
            except AttributeError:
                pass
        data = numpy.require(data, requirements=('C', 'A', 'W'), dtype=numpy.int64)
    elif (cdf_type in lib.numpytypedict):
        data = numpy.require(data, requirements=('C', 'A', 'W'), dtype=lib.numpytypedict[cdf_type])
    else:
        raise CDFError(const.BAD_DATA_TYPE)
    self._call(const.SELECT_, self.ENTRY_, ctypes.c_long(number), const.PUT_, self.ENTRY_DATA_, ctypes.c_long(cdf_type), ctypes.c_long(n_write), data.ctypes.data_as(ctypes.c_void_p))