[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/python/python-docs-ko/3.14/c-api/buffer.po [Back]  [Original]

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2017, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR , 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-11 20:40+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Dong-gweon Oh \n"
"Language-Team: Korean (https://python.flowdas.com)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.17.0\n"

#: ../../c-api/buffer.rst:11
msgid "Buffer Protocol"
msgstr " "

#: ../../c-api/buffer.rst:18
msgid ""
"Certain objects available in Python wrap access to an underlying memory "
"array or *buffer*.  Such objects include the built-in :class:`bytes` and "
":class:`bytearray`, and some extension types like :class:`array.array`. "
"Third-party libraries may define their own types for special purposes, "
"such as image processing or numeric analysis."
msgstr ""
"          **\\   .    "
":class:`bytes`  :class:`bytearray`,  :class:`array.array`\\   "
" .              ."

#: ../../c-api/buffer.rst:24
msgid ""
"While each of these types have their own semantics, they share the common"
" characteristic of being backed by a possibly large memory buffer.  It is"
" then desirable, in some situations, to access that buffer directly and "
"without intermediate copying."
msgstr ""
"     , ()        .   "
"       ."

#: ../../c-api/buffer.rst:29
#, fuzzy
msgid ""
"Python provides such a facility at the C and Python level in the form of "
"the :ref:`buffer protocol `.  This protocol has two sides:"
msgstr ""
" C  :ref:`  `    .   "
"   :"

#: ../../c-api/buffer.rst:34
#, fuzzy
msgid ""
"on the producer side, a type can export a \"buffer interface\" which "
"allows objects of that type to expose information about their underlying "
"buffer. This interface is described in the section :ref:`buffer-structs`;"
" for Python see :ref:`python-buffer-protocol`."
msgstr ""
" ,  \" \"   ,          . "
"  :ref:`buffer-structs`  ."

#: ../../c-api/buffer.rst:39
#, fuzzy
msgid ""
"on the consumer side, several means are available to obtain a pointer to "
"the raw underlying data of an object (for example a method parameter). "
"For Python see :class:`memoryview`."
msgstr ""
" ,               (   "
" )."

#: ../../c-api/buffer.rst:43
msgid ""
"Simple objects such as :class:`bytes` and :class:`bytearray` expose their"
" underlying buffer in byte-oriented form.  Other forms are possible; for "
"example, the elements exposed by an :class:`array.array` can be multi-"
"byte values."
msgstr ""
":class:`bytes`  :class:`bytearray`\\         "
".   ;  , :class:`array.array`\\      "
"   ."

#: ../../c-api/buffer.rst:47
msgid ""
"An example consumer of the buffer interface is the "
":meth:`~io.BufferedIOBase.write` method of file objects: any object that "
"can export a series of bytes through the buffer interface can be written "
"to a file.  While :meth:`!write` only needs read-only access to the "
"internal contents of the object passed to it, other methods such as "
":meth:`~io.BufferedIOBase.readinto` need write access to the contents of "
"their argument.  The buffer interface allows objects to selectively allow"
" or reject exporting of read-write and read-only buffers."
msgstr ""
"      :meth:`~io.BufferedIOBase.write` :  "
"            . :meth:`!write`\\  "
"       , :meth:`~io.BufferedIOBase.readinto`\\ "
"       .    -     "
"    ."

#: ../../c-api/buffer.rst:55
msgid ""
"There are two ways for a consumer of the buffer interface to acquire a "
"buffer over a target object:"
msgstr "           :"

#: ../../c-api/buffer.rst:58
msgid "call :c:func:`PyObject_GetBuffer` with the right parameters;"
msgstr "   :c:func:`PyObject_GetBuffer`\\ ;"

#: ../../c-api/buffer.rst:60
msgid ""
"call :c:func:`PyArg_ParseTuple` (or one of its siblings) with one of the "
"``y*``, ``w*`` or ``s*`` :ref:`format codes `."
msgstr ""
"``y*``, ``w*``  ``s*`` :ref:`  `    "
":c:func:`PyArg_ParseTuple`\\(    ) ."

#: ../../c-api/buffer.rst:63
msgid ""
"In both cases, :c:func:`PyBuffer_Release` must be called when the buffer "
"isn't needed anymore.  Failure to do so could lead to various issues such"
" as resource leaks."
msgstr ""
"  ,     :c:func:`PyBuffer_Release`\\  .   "
"        ."

#: ../../c-api/buffer.rst:69
msgid ""
"The buffer protocol is now accessible in Python, see :ref:`python-buffer-"
"protocol` and :class:`memoryview`."
msgstr ""

#: ../../c-api/buffer.rst:75
msgid "Buffer structure"
msgstr " "

#: ../../c-api/buffer.rst:77
msgid ""
"Buffer structures (or simply \"buffers\") are useful as a way to expose "
"the binary data from another object to the Python programmer.  They can "
"also be used as a zero-copy slicing mechanism.  Using their ability to "
"reference a block of memory, it is possible to expose any data to the "
"Python programmer quite easily.  The memory could be a large, constant "
"array in a C extension, it could be a raw block of memory for "
"manipulation before passing to an operating system library, or it could "
"be used to pass around structured data in its native, in-memory format."
msgstr ""
" (  \"\")         . , "
" (zero-copy)     .     ,   "
"      .  C      ,    "
"        ,   (in-memory)    "
"    ."

#: ../../c-api/buffer.rst:86
msgid ""
"Contrary to most data types exposed by the Python interpreter, buffers "
"are not :c:type:`PyObject` pointers but rather simple C structures.  This"
" allows them to be created and copied very simply.  When a generic "
"wrapper around a buffer is needed, a :ref:`memoryview ` object can be created."
msgstr ""
"     ,  :c:type:`PyObject`    C "
".        .      , :ref:`  "
"`    ."

#: ../../c-api/buffer.rst:92
msgid ""
"For short instructions how to write an exporting object, see :ref:`Buffer"
" Object Structures `. For obtaining a buffer, see "
":c:func:`PyObject_GetBuffer`."
msgstr ""
"(exporting)     :ref:`   `\\ "
".  , :c:func:`PyObject_GetBuffer`\\ ."

#: ../../c-api/buffer.rst:100
msgid ""
"A pointer to the start of the logical structure described by the buffer "
"fields. This can be any location within the underlying physical memory "
"block of the exporter. For example, with negative "
":c:member:`~Py_buffer.strides` the value may point to the end of the "
"memory block."
msgstr ""
"        .  (exporter)      "
"   .  ,  :c:member:`~Py_buffer.strides`\\    "
"    ."

#: ../../c-api/buffer.rst:105
msgid ""
"For :term:`contiguous` arrays, the value points to the beginning of the "
"memory block."
msgstr ":term:` `  ,     ."

#: ../../c-api/buffer.rst:110
msgid ""
"A new reference to the exporting object. The reference is owned by the "
"consumer and automatically released (i.e. reference count decremented) "
"and set to ``NULL`` by :c:func:`PyBuffer_Release`. The field is the "
"equivalent of the return value of any standard C-API function."
msgstr ""
"(exporting)    .   , :c:func:`PyBuffer_Release`\\"
"    (   ) ``NULL``\\ .    C-API   "
" ."

#: ../../c-api/buffer.rst:117
msgid ""
"As a special case, for *temporary* buffers that are wrapped by "
":c:func:`PyMemoryView_FromBuffer` or :c:func:`PyBuffer_FillInfo` this "
"field is ``NULL``. In general, exporting objects MUST NOT use this "
"scheme."
msgstr ""
" , :c:func:`PyMemoryView_FromBuffer`  "
":c:func:`PyBuffer_FillInfo`\\  *(temporary)*  ,   "
"``NULL``\\. , (exporting)      ."

#: ../../c-api/buffer.rst:124
msgid ""
"``product(shape) * itemsize``. For contiguous arrays, this is the length "
"of the underlying memory block. For non-contiguous arrays, it is the "
"length that the logical structure would have if it were copied to a "
"contiguous representation."
msgstr ""
"``product(shape) * itemsize``.   ,    .   , "
"       ."

#: ../../c-api/buffer.rst:129
msgid ""
"Accessing ``((char *)buf)[0] up to ((char *)buf)[len-1]`` is only valid "
"if the buffer has been obtained by a request that guarantees contiguity. "
"In most cases such a request will be :c:macro:`PyBUF_SIMPLE` or "
":c:macro:`PyBUF_WRITABLE`."
msgstr ""
"``((char *)buf)[0]  ((char *)buf)[len-1]``       "
"  .    :c:macro:`PyBUF_SIMPLE`  "
":c:macro:`PyBUF_WRITABLE`\\."

#: ../../c-api/buffer.rst:135
msgid ""
"An indicator of whether the buffer is read-only. This field is controlled"
" by the :c:macro:`PyBUF_WRITABLE` flag."
msgstr "    .   :c:macro:`PyBUF_WRITABLE`  ."

#: ../../c-api/buffer.rst:140
msgid ""
"Item size in bytes of a single element. Same as the value of "
":func:`struct.calcsize` called on non-``NULL`` "
":c:member:`~Py_buffer.format` values."
msgstr ""
"   (). ``NULL``\\  :c:member:`~Py_buffer.format`  "
" :func:`struct.calcsize`  ."

#: ../../c-api/buffer.rst:143
msgid ""
"Important exception: If a consumer requests a buffer without the "
":c:macro:`PyBUF_FORMAT` flag, :c:member:`~Py_buffer.format` will be set "
"to  ``NULL``,  but :c:member:`~Py_buffer.itemsize` still has the value "
"for the original format."
msgstr ""
" :  :c:macro:`PyBUF_FORMAT`    , "
":c:member:`~Py_buffer.format`\\ ``NULL``\\ , "
":c:member:`~Py_buffer.itemsize`\\     ."

#: ../../c-api/buffer.rst:148
msgid ""
"If :c:member:`~Py_buffer.shape` is present, the equality ``product(shape)"
" * itemsize == len`` still holds and the consumer can use "
":c:member:`~Py_buffer.itemsize` to navigate the buffer."
msgstr ""
":c:member:`~Py_buffer.shape`\\ , ``product(shape) * itemsize == len``"
"     :c:member:`~Py_buffer.itemsize`\\     ."

#: ../../c-api/buffer.rst:152
msgid ""
"If :c:member:`~Py_buffer.shape` is ``NULL`` as a result of a "
":c:macro:`PyBUF_SIMPLE` or a :c:macro:`PyBUF_WRITABLE` request, the "
"consumer must disregard :c:member:`~Py_buffer.itemsize` and assume "
"``itemsize == 1``."
msgstr ""
":c:macro:`PyBUF_SIMPLE`  :c:macro:`PyBUF_WRITABLE`   "
":c:member:`~Py_buffer.shape`\\ ``NULL``\\,  "
":c:member:`~Py_buffer.itemsize`\\  ``itemsize == 1``\\  ."

#: ../../c-api/buffer.rst:158
msgid ""
"A *NULL* terminated string in :mod:`struct` module style syntax "
"describing the contents of a single item. If this is ``NULL``, ``\"B\"`` "
"(unsigned bytes) is assumed."
msgstr ""
"    :mod:`struct`    *NULL*  .  ``NULL``\\,"
" ``\"B\"``\\(  ) ."

#: ../../c-api/buffer.rst:162
msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag."
msgstr "  :c:macro:`PyBUF_FORMAT`  ."

#: ../../c-api/buffer.rst:166
msgid ""
"The number of dimensions the memory represents as an n-dimensional array."
" If it is ``0``, :c:member:`~Py_buffer.buf` points to a single item "
"representing a scalar. In this case, :c:member:`~Py_buffer.shape`, "
":c:member:`~Py_buffer.strides` and :c:member:`~Py_buffer.suboffsets` MUST"
" be ``NULL``. The maximum number of dimensions is given by "
":c:macro:`PyBUF_MAX_NDIM`."
msgstr ""
" n     . ``0``\\, :c:member:`~Py_buffer.buf`\\  "
"    .  , :c:member:`~Py_buffer.shape`, "
":c:member:`~Py_buffer.strides`  :c:member:`~Py_buffer.suboffsets`\\ "
" ``NULL``  .    :c:macro:`PyBUF_MAX_NDIM`\\ ."

#: ../../c-api/buffer.rst:174
msgid ""
"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` "
"indicating the shape of the memory as an n-dimensional array. Note that "
"``shape[0] * ... * shape[ndim-1] * itemsize`` MUST be equal to "
":c:member:`~Py_buffer.len`."
msgstr ""
"n-      :c:member:`~Py_buffer.ndim`\\ "
":c:type:`Py_ssize_t` . ``shape[0] * ... * shape[ndim-1] * itemsize``\\"
" :c:member:`~Py_buffer.len`\\  ."

#: ../../c-api/buffer.rst:179
msgid ""
"Shape values are restricted to ``shape[n] >= 0``. The case ``shape[n] == "
"0`` requires special attention. See `complex arrays`_ for further "
"information."
msgstr ""
"  ``shape[n] >= 0``\\ . ``shape[n] == 0``\\    ."
"   `  `_\\ ."

#: ../../c-api/buffer.rst:183
msgid "The shape array is read-only for the consumer."
msgstr "shape    ."

#: ../../c-api/buffer.rst:187
msgid ""
"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` "
"giving the number of bytes to skip to get to a new element in each "
"dimension."
msgstr ""
"           :c:member:`~Py_buffer.ndim`\\ "
":c:type:`Py_ssize_t` ."

#: ../../c-api/buffer.rst:191
msgid ""
"Stride values can be any integer. For regular arrays, strides are usually"
" positive, but a consumer MUST be able to handle the case ``strides[n] = 0`` , n          (de-"
"referencing)       .     (de-referencing) "
"    (   )."

#: ../../c-api/buffer.rst:206
msgid ""
"If all suboffsets are negative (i.e. no de-referencing is needed), then "
"this field must be ``NULL`` (the default value)."
msgstr "    (,   ),   ``NULL``\\()  ."

#: ../../c-api/buffer.rst:209
msgid ""
"This type of array representation is used by the Python Imaging Library "
"(PIL). See `complex arrays`_ for further information how to access "
"elements of such an array."
msgstr ""
"      (PIL) .         "
"`  `_\\ ."

#: ../../c-api/buffer.rst:213
msgid "The suboffsets array is read-only for the consumer."
msgstr "suboffsets    ."

#: ../../c-api/buffer.rst:217
msgid ""
"This is for use internally by the exporting object. For example, this "
"might be re-cast as an integer by the exporter and used to store flags "
"about whether or not the shape, strides, and suboffsets arrays must be "
"freed when the buffer is released. The consumer MUST NOT alter this "
"value."
msgstr ""
" (exporting)    .  ,  (exporter)   "
"  ,    shape, strides  suboffsets      "
"  .      ."

#: ../../c-api/buffer.rst:224
msgid "Constants:"
msgstr ":"

#: ../../c-api/buffer.rst:228
msgid ""
"The maximum number of dimensions the memory represents. Exporters MUST "
"respect this limit, consumers of multi-dimensional buffers SHOULD be able"
" to handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions. Currently set to "
"64."
msgstr ""
"     .     ,    "
":c:macro:`!PyBUF_MAX_NDIM`     .  64 ."

#: ../../c-api/buffer.rst:237
msgid "Buffer request types"
msgstr "  "

#: ../../c-api/buffer.rst:239
msgid ""
"Buffers are usually obtained by sending a buffer request to an exporting "
"object via :c:func:`PyObject_GetBuffer`. Since the complexity of the "
"logical structure of the memory can vary drastically, the consumer uses "
"the *flags* argument to specify the exact buffer type it can handle."
msgstr ""
"  :c:func:`PyObject_GetBuffer`\\  (exporting)     "
".        ,          "
"*flags*  ."

#: ../../c-api/buffer.rst:244
msgid ""
"All :c:type:`Py_buffer` fields are unambiguously defined by the request "
"type."
msgstr " :c:type:`Py_buffer`       ."

#: ../../c-api/buffer.rst:248
msgid "request-independent fields"
msgstr "  "

#: ../../c-api/buffer.rst:249
msgid ""
"The following fields are not influenced by *flags* and must always be "
"filled in with the correct values: :c:member:`~Py_buffer.obj`, "
":c:member:`~Py_buffer.buf`, :c:member:`~Py_buffer.len`, "
":c:member:`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`."
msgstr ""
"  *flags*\\        : "
":c:member:`~Py_buffer.obj`, :c:member:`~Py_buffer.buf`, "
":c:member:`~Py_buffer.len`, :c:member:`~Py_buffer.itemsize`, "
":c:member:`~Py_buffer.ndim`."

#: ../../c-api/buffer.rst:254
msgid "readonly, format"
msgstr "readonly, format"

#: ../../c-api/buffer.rst:258
msgid ""
"Controls the :c:member:`~Py_buffer.readonly` field. If set, the exporter "
"MUST provide a writable buffer or else report failure. Otherwise, the "
"exporter MAY provide either a read-only or writable buffer, but the "
"choice MUST be consistent for all consumers. For example, "
":c:expr:`PyBUF_SIMPLE | PyBUF_WRITABLE` can be used to request a simple "
"writable buffer."
msgstr ""
":c:member:`~Py_buffer.readonly`  . ,      "
"   .  ,          ,   "
"   .  ,      :c:expr:`PyBUF_SIMPLE | "
"PyBUF_WRITABLE`\\   ."

#: ../../c-api/buffer.rst:266
msgid ""
"Controls the :c:member:`~Py_buffer.format` field. If set, this field MUST"
" be filled in correctly. Otherwise, this field MUST be ``NULL``."
msgstr ""
":c:member:`~Py_buffer.format`  . ,     .  "
",    ``NULL``  ."

#: ../../c-api/buffer.rst:270
msgid ""
":c:macro:`PyBUF_WRITABLE` can be \\|'d to any of the flags in the next "
"section. Since :c:macro:`PyBUF_SIMPLE` is defined as 0, "
":c:macro:`PyBUF_WRITABLE` can be used as a stand-alone flag to request a "
"simple writable buffer."
msgstr ""
":c:macro:`PyBUF_WRITABLE`\\     \\|   . "
":c:macro:`PyBUF_SIMPLE`\\ 0 , :c:macro:`PyBUF_WRITABLE`\\  "
"        ."

#: ../../c-api/buffer.rst:274
msgid ""
":c:macro:`PyBUF_FORMAT` must be \\|'d to any of the flags except "
":c:macro:`PyBUF_SIMPLE`, because the latter already implies format ``B`` "
"(unsigned bytes). :c:macro:`!PyBUF_FORMAT` cannot be used on its own."
msgstr ""
":c:macro:`PyBUF_FORMAT`\\ :c:macro:`PyBUF_SIMPLE`\\    \\| "
" . PyBUF_SIMPLE    ``B``\\(  )  . "
":c:macro:`!PyBUF_FORMAT`\\    ."

#: ../../c-api/buffer.rst:280
msgid "shape, strides, suboffsets"
msgstr "shape, strides, suboffsets"

#: ../../c-api/buffer.rst:282
msgid ""
"The flags that control the logical structure of the memory are listed in "
"decreasing order of complexity. Note that each flag contains all bits of "
"the flags below it."
msgstr ""
"        .         "
"."

#: ../../c-api/buffer.rst:289 ../../c-api/buffer.rst:313
#: ../../c-api/buffer.rst:338
msgid "Request"
msgstr ""

#: ../../c-api/buffer.rst:289 ../../c-api/buffer.rst:313
#: ../../c-api/buffer.rst:338
msgid "shape"
msgstr "shape"

#: ../../c-api/buffer.rst:289 ../../c-api/buffer.rst:313
#: ../../c-api/buffer.rst:338
msgid "strides"
msgstr "strides"

#: ../../c-api/buffer.rst:289 ../../c-api/buffer.rst:313
#: ../../c-api/buffer.rst:338
msgid "suboffsets"
msgstr "suboffsets"

#: ../../c-api/buffer.rst:291 ../../c-api/buffer.rst:293
#: ../../c-api/buffer.rst:295 ../../c-api/buffer.rst:315
#: ../../c-api/buffer.rst:317 ../../c-api/buffer.rst:319
#: ../../c-api/buffer.rst:321 ../../c-api/buffer.rst:340
#: ../../c-api/buffer.rst:342 ../../c-api/buffer.rst:344
#: ../../c-api/buffer.rst:346 ../../c-api/buffer.rst:348
#: ../../c-api/buffer.rst:350 ../../c-api/buffer.rst:352
#: ../../c-api/buffer.rst:354
msgid "yes"
msgstr "yes"

#: ../../c-api/buffer.rst:291 ../../c-api/buffer.rst:340
#: ../../c-api/buffer.rst:342
msgid "if needed"
msgstr ""

#: ../../c-api/buffer.rst:293 ../../c-api/buffer.rst:295
#: ../../c-api/buffer.rst:297 ../../c-api/buffer.rst:315
#: ../../c-api/buffer.rst:317 ../../c-api/buffer.rst:319
#: ../../c-api/buffer.rst:321 ../../c-api/buffer.rst:344
#: ../../c-api/buffer.rst:346 ../../c-api/buffer.rst:348
#: ../../c-api/buffer.rst:350 ../../c-api/buffer.rst:352
#: ../../c-api/buffer.rst:354
msgid "NULL"
msgstr "NULL"

#: ../../c-api/buffer.rst:304
msgid "contiguity requests"
msgstr " "

#: ../../c-api/buffer.rst:306
msgid ""
"C or Fortran :term:`contiguity ` can be explicitly requested,"
" with and without stride information. Without stride information, the "
"buffer must be C-contiguous."
msgstr ""
"C   :term:` `\\    ,     "
" .   ,  C- ."

#: ../../c-api/buffer.rst:313 ../../c-api/buffer.rst:338
msgid "contig"
msgstr ""

#: ../../c-api/buffer.rst:315 ../../c-api/buffer.rst:321
#: ../../c-api/buffer.rst:352 ../../c-api/buffer.rst:354
msgid "C"
msgstr "C"

#: ../../c-api/buffer.rst:317
msgid "F"
msgstr "F"

#: ../../c-api/buffer.rst:319
msgid "C or F"
msgstr "C  F"

#: ../../c-api/buffer.rst:321
msgid ":c:macro:`PyBUF_ND`"
msgstr ":c:macro:`PyBUF_ND`"

#: ../../c-api/buffer.rst:326
msgid "compound requests"
msgstr " "

#: ../../c-api/buffer.rst:328
msgid ""
"All possible requests are fully defined by some combination of the flags "
"in the previous section. For convenience, the buffer protocol provides "
"frequently used combinations as single flags."
msgstr ""
"         . ,        "
"."

#: ../../c-api/buffer.rst:332
msgid ""
"In the following table *U* stands for undefined contiguity. The consumer "
"would have to call :c:func:`PyBuffer_IsContiguous` to determine "
"contiguity."
msgstr ""
"  *U*\\    .     "
":c:func:`PyBuffer_IsContiguous`\\  ."

#: ../../c-api/buffer.rst:338
msgid "readonly"
msgstr "readonly"

#: ../../c-api/buffer.rst:338
msgid "format"
msgstr "format"

#: ../../c-api/buffer.rst:340 ../../c-api/buffer.rst:342
#: ../../c-api/buffer.rst:344 ../../c-api/buffer.rst:346
#: ../../c-api/buffer.rst:348 ../../c-api/buffer.rst:350
msgid "U"
msgstr "U"

#: ../../c-api/buffer.rst:340 ../../c-api/buffer.rst:344
#: ../../c-api/buffer.rst:348 ../../c-api/buffer.rst:352
msgid "0"
msgstr "0"

#: ../../c-api/buffer.rst:342 ../../c-api/buffer.rst:346
#: ../../c-api/buffer.rst:350 ../../c-api/buffer.rst:354
msgid "1 or 0"
msgstr "1  0"

#: ../../c-api/buffer.rst:359
msgid "Complex arrays"
msgstr " "

#: ../../c-api/buffer.rst:362
msgid "NumPy-style: shape and strides"
msgstr "NumPy-: shape strides"

#: ../../c-api/buffer.rst:364
msgid ""
"The logical structure of NumPy-style arrays is defined by "
":c:member:`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`, "
":c:member:`~Py_buffer.shape` and :c:member:`~Py_buffer.strides`."
msgstr ""
"NumPy     :c:member:`~Py_buffer.itemsize`, "
":c:member:`~Py_buffer.ndim`, :c:member:`~Py_buffer.shape`  "
":c:member:`~Py_buffer.strides`\\ ."

#: ../../c-api/buffer.rst:367
msgid ""
"If ``ndim == 0``, the memory location pointed to by "
":c:member:`~Py_buffer.buf` is interpreted as a scalar of size "
":c:member:`~Py_buffer.itemsize`. In that case, both "
":c:member:`~Py_buffer.shape` and :c:member:`~Py_buffer.strides` are "
"``NULL``."
msgstr ""
"``ndim == 0``\\, :c:member:`~Py_buffer.buf`\\    "
":c:member:`~Py_buffer.itemsize`   .  , "
":c:member:`~Py_buffer.shape`  :c:member:`~Py_buffer.strides`\\  "
"``NULL``\\."

#: ../../c-api/buffer.rst:371
msgid ""
"If :c:member:`~Py_buffer.strides` is ``NULL``, the array is interpreted "
"as a standard n-dimensional C-array. Otherwise, the consumer must access "
"an n-dimensional array as follows:"
msgstr ""
":c:member:`~Py_buffer.strides`\\ ``NULL``\\,   n- C  . "
" ,    n-   :"

#: ../../c-api/buffer.rst:375
msgid ""
"ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * "
"strides[n-1];\n"
"item = *((typeof(item) *)ptr);"
msgstr ""
"ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * "
"strides[n-1];\n"
"item = *((typeof(item) *)ptr);"

#: ../../c-api/buffer.rst:381
msgid ""
"As noted above, :c:member:`~Py_buffer.buf` can point to any location "
"within the actual memory block. An exporter can check the validity of a "
"buffer with this function:"
msgstr ""
" , :c:member:`~Py_buffer.buf`\\         . "
"(exporter)        :"

#: ../../c-api/buffer.rst:385
#, python-format
msgid ""
"def verify_structure(memlen, itemsize, ndim, shape, strides, offset):\n"
"    \"\"\"Verify that the parameters represent a valid array within\n"
"       the bounds of the allocated memory:\n"
"           char *mem: start of the physical memory block\n"
"           memlen: length of the physical memory block\n"
"           offset: (char *)buf - mem\n"
"    \"\"\"\n"
"    if offset % itemsize:\n"
"        return False\n"
"    if offset < 0 or offset+itemsize > memlen:\n"
"        return False\n"
"    if any(v % itemsize for v in strides):\n"
"        return False\n"
"\n"
"    if ndim obj``. This function MUST be called when the buffer is no longer "
"being used, otherwise reference leaks may occur."
msgstr ""
" *view*\\     ``view->obj``\\  :term:`  `\\  (   ).     ,     "
".       ."

#: ../../c-api/buffer.rst:479
msgid ""
"It is an error to call this function on a buffer that was not obtained "
"via :c:func:`PyObject_GetBuffer`."
msgstr ":c:func:`PyObject_GetBuffer`\\         ."

#: ../../c-api/buffer.rst:485
msgid ""
"Return the implied :c:member:`~Py_buffer.itemsize` from "
":c:member:`~Py_buffer.format`. On error, raise an exception and return "
"-1."
msgstr ""
":c:member:`~Py_buffer.format`\\  :c:member:`~Py_buffer.itemsize`\\ "
".  ,   -1 ."

#: ../../c-api/buffer.rst:493
msgid ""
"Return ``1`` if the memory defined by the *view* is C-style (*order* is "
"``'C'``) or Fortran-style (*order* is ``'F'``) :term:`contiguous` or "
"either one (*order* is ``'A'``).  Return ``0`` otherwise.  This function "
"always succeeds."
msgstr ""
"*view*\\   C (*order*\\ ``'C'``)  (*order*\\ "
"``'F'``) :term:` `\\   (*order*\\ ``'A'``) "
"``1``\\ .   ``0``\\ .    ."

#: ../../c-api/buffer.rst:500
msgid ""
"Get the memory area pointed to by the *indices* inside the given *view*. "
"*indices* must point to an array of ``view->ndim`` indices."
msgstr ""
" *view*  *indices*\\    . *indices*\\ "
"``view->ndim``    ."

#: ../../c-api/buffer.rst:506
msgid ""
"Copy contiguous *len* bytes from *buf* to *view*. *fort* can be ``'C'`` "
"or ``'F'`` (for C-style or Fortran-style ordering). ``0`` is returned on "
"success, ``-1`` on error."
msgstr ""
"*buf*\\   *len*  *view*\\ . *fort*\\ ``'C'``  "
"``'F'``\\(C     )  .  ``0``\\ ,   "
"``-1``\\ ."

#: ../../c-api/buffer.rst:513
msgid ""
"Copy *len* bytes from *src* to its contiguous representation in *buf*. "
"*order* can be ``'C'`` or ``'F'`` or ``'A'`` (for C-style or Fortran-"
"style ordering or either one). ``0`` is returned on success, ``-1`` on "
"error."
msgstr ""
"*src*\\  *len*  *buf*\\   . *order*\\ ``'C'``  "
"``'F'``  ``'A'``\\(C         )  .  "
"``0``\\ ,   ``-1``\\ ."

#: ../../c-api/buffer.rst:517
msgid "This function fails if *len* != *src->len*."
msgstr "  *len* != *src->len*\\ ."

#: ../../c-api/buffer.rst:522
msgid ""
"Copy data from *src* to *dest* buffer. Can convert between C-style and or"
" Fortran-style buffers."
msgstr ""

#: ../../c-api/buffer.rst:525
msgid "``0`` is returned on success, ``-1`` on error."
msgstr ""

#: ../../c-api/buffer.rst:529
msgid ""
"Fill the *strides* array with byte-strides of a :term:`contiguous` "
"(C-style if *order* is ``'C'`` or Fortran-style if *order* is ``'F'``) "
"array of the given shape with the given number of bytes per element."
msgstr ""
"*strides*       shape  :term:` ` "
"(*order*\\ ``'C'``\\ C , *order*\\ ``'F'``\\  )   "
" ."

#: ../../c-api/buffer.rst:536
msgid ""
"Handle buffer requests for an exporter that wants to expose *buf* of size"
" *len* with writability set according to *readonly*. *buf* is interpreted"
" as a sequence of unsigned bytes."
msgstr ""
"*readonly*\\     *len*  *buf*\\  (exporter)  "
"  . *buf*\\     ."

#: ../../c-api/buffer.rst:540
msgid ""
"The *flags* argument indicates the request type. This function always "
"fills in *view* as specified by flags, unless *buf* has been designated "
"as read-only and :c:macro:`PyBUF_WRITABLE` is set in *flags*."
msgstr ""
"*flags*    .   *buf*\\    "
":c:macro:`PyBUF_WRITABLE`\\ *flags*\\   ,     "
"*view*\\ ."

#: ../../c-api/buffer.rst:544
msgid ""
"On success, set ``view->obj`` to a new reference to *exporter* and return"
" 0. Otherwise, raise :exc:`BufferError`, set ``view->obj`` to ``NULL`` "
"and return ``-1``;"
msgstr ""
", ``view->obj``\\ *exporter*\\    , 0 .  , "
":exc:`BufferError`\\ , ``view->obj``\\ ``NULL``\\   ``-1``\\"
" ."

#: ../../c-api/buffer.rst:548
msgid ""
"If this function is used as part of a :ref:`getbufferproc `, *exporter* MUST be set to the exporting object and *flags* "
"must be passed unmodified. Otherwise, *exporter* MUST be ``NULL``."
msgstr ""
"  :ref:`getbufferproc `\\  , *exporter*\\ "
"(exporting)   , *flags*\\     .   "
"*exporter*\\ ``NULL``\\ ."

#: ../../c-api/buffer.rst:3
msgid "buffer protocol"
msgstr " "

#: ../../c-api/buffer.rst:3
msgid "buffer interface"
msgstr " "

#: ../../c-api/buffer.rst:3
msgid "(see buffer protocol)"
msgstr "(  )"

#: ../../c-api/buffer.rst:3
msgid "buffer object"
msgstr " "

#: ../../c-api/buffer.rst:32
msgid "PyBufferProcs (C type)"
msgstr "PyBufferProcs (C )"

#: ../../c-api/buffer.rst:301
msgid "contiguous"
msgstr ""

#: ../../c-api/buffer.rst:301
msgid "C-contiguous"
msgstr "C-"

#: ../../c-api/buffer.rst:301
msgid "Fortran contiguous"
msgstr " "


Web Proxy Viewer  |  New URL  |  Original Page