-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbuffer.po
More file actions
838 lines (721 loc) · 41.4 KB
/
Copy pathbuffer.po
File metadata and controls
838 lines (721 loc) · 41.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Dmytro Kazanzhy, 2022
# Vadim Kashirny, 2023
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-18 14:18+0000\n"
"PO-Revision-Date: 2021-06-28 00:47+0000\n"
"Last-Translator: Vadim Kashirny, 2023\n"
"Language-Team: Ukrainian (https://app.transifex.com/python-doc/teams/5390/"
"uk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: uk\n"
"Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != "
"11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % "
"100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || "
"(n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n"
msgid "Buffer Protocol"
msgstr "Буферний протокол"
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 ""
"Певні об’єкти, доступні в Python, обертають доступ до базового масиву "
"пам’яті або *буфера*. До таких об’єктів належать вбудовані :class:`bytes` і :"
"class:`bytearray`, а також деякі типи розширень, наприклад :class:`array."
"array`. Бібліотеки сторонніх розробників можуть визначати власні типи для "
"спеціальних цілей, таких як обробка зображень або числовий аналіз."
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 ""
"У той час як кожен із цих типів має власну семантику, вони поділяють спільну "
"характеристику, що вони підтримуються можливо великим буфером пам’яті. Тоді "
"в деяких ситуаціях бажано отримати доступ до цього буфера безпосередньо й "
"без проміжного копіювання."
msgid ""
"Python provides such a facility at the C level in the form of the :ref:"
"`buffer protocol <bufferobjects>`. This protocol has two sides:"
msgstr ""
"Python надає таку можливість на рівні C у формі :ref:`протоколу буфера "
"<bufferobjects>`. Цей протокол має дві сторони:"
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`;"
msgstr ""
"на стороні виробника тип може експортувати \"інтерфейс буфера\", який "
"дозволяє об’єктам цього типу надавати інформацію про їхній базовий буфер. "
"Цей інтерфейс описано в розділі :ref:`buffer-structs`;"
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)."
msgstr ""
"на стороні споживача доступно кілька засобів для отримання вказівника на "
"необроблені базові дані об’єкта (наприклад, параметр методу)."
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`, можуть мати багатобайтові "
"значення."
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 ""
msgid ""
"There are two ways for a consumer of the buffer interface to acquire a "
"buffer over a target object:"
msgstr ""
"Споживач інтерфейсу буфера може отримати буфер над цільовим об’єктом двома "
"способами:"
msgid "call :c:func:`PyObject_GetBuffer` with the right parameters;"
msgstr "викликати :c:func:`PyObject_GetBuffer` з правильними параметрами;"
msgid ""
"call :c:func:`PyArg_ParseTuple` (or one of its siblings) with one of the "
"``y*``, ``w*`` or ``s*`` :ref:`format codes <arg-parsing>`."
msgstr ""
"викликати :c:func:`PyArg_ParseTuple` (або один із його братів і сестер) з "
"одним із ``y*``, ``w*`` або ``s*`` :ref:`кодів формату <arg-parsing>`."
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` потрібно викликати, коли буфер "
"більше не потрібен. Якщо цього не зробити, це може призвести до "
"різноманітних проблем, наприклад до витоку ресурсів."
msgid "Buffer structure"
msgstr "Буферна структура"
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 ""
"Буферні структури (або просто \"буфери\") корисні як спосіб надати двійкові "
"дані з іншого об’єкта програмісту Python. Їх також можна використовувати як "
"механізм нарізки без копіювання. Використовуючи їх здатність посилатися на "
"блок пам’яті, можна досить легко надати будь-які дані програмісту Python. "
"Пам’ять може бути великим постійним масивом у розширенні C, це може бути "
"необроблений блок пам’яті для маніпуляцій перед передачею в бібліотеку "
"операційної системи, або її можна використовувати для передачі "
"структурованих даних у їх рідному форматі в пам’яті. ."
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 <memoryview-objects>` object can be "
"created."
msgstr ""
"На відміну від більшості типів даних, наданих інтерпретатором Python, буфери "
"не є покажчиками :c:type:`PyObject`, а досить простими структурами C. Це "
"дозволяє дуже просто створювати та копіювати їх. Якщо потрібна загальна "
"обгортка навколо буфера, можна створити об’єкт :ref:`memoryview <memoryview-"
"objects>`."
msgid ""
"For short instructions how to write an exporting object, see :ref:`Buffer "
"Object Structures <buffer-structs>`. For obtaining a buffer, see :c:func:"
"`PyObject_GetBuffer`."
msgstr ""
"Щоб отримати короткі інструкції щодо написання об’єкта експорту, "
"перегляньте :ref:`Структури об’єктів буфера <buffer-structs>`. Щоб отримати "
"буфер, перегляньте :c:func:`PyObject_GetBuffer`."
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 ""
"Покажчик на початок логічної структури, описаної полями буфера. Це може бути "
"будь-яке розташування в базовому блоці фізичної пам’яті експортера. "
"Наприклад, з негативним :c:member:`~Py_buffer.strides` значення може "
"вказувати на кінець блоку пам’яті."
msgid ""
"For :term:`contiguous` arrays, the value points to the beginning of the "
"memory block."
msgstr ""
"Для масивів :term:`contiguous` значення вказує на початок блоку пам’яті."
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 ""
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`, це поле має "
"значення ``NULL``. Загалом, експорт об’єктів НЕ ПОВИНЕН використовувати цю "
"схему."
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``. Для безперервних масивів це довжина основного "
"блоку пам’яті. Для несуміжних масивів це довжина, яку мала б логічна "
"структура, якби її було скопійовано до безперервного представлення."
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`."
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`."
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 ""
"Розмір елемента в байтах одного елемента. Те саме, що значення :func:`struct."
"calcsize`, викликане для не-``NULL`` значень :c:member:`~Py_buffer.format`."
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` все ще має значення для вихідного "
"формату."
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` для навігації буфер."
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:member:`~Py_buffer.shape` має значення ``NULL`` в результаті запиту :"
"c:macro:`PyBUF_SIMPLE` або :c:macro:`PyBUF_WRITABLE`, споживач повинен "
"ігнорувати :c:member:`~Py_buffer.itemsize` і припустимо ``itemsize == 1``."
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 ""
msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag."
msgstr "Це поле контролюється прапорцем :c:macro:`PyBUF_FORMAT`."
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 ""
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 ""
"Масив :c:type:`Py_ssize_t` довжини :c:member:`~Py_buffer.ndim`, що вказує "
"форму пам’яті як n-вимірного масиву. Зауважте, що ``shape[0] * ... * "
"shape[ndim-1] * itemsize`` ПОВИНЕН дорівнювати :c:member:`~Py_buffer.len`."
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`` вимагає "
"особливої уваги. Див. `complex arrays`_ для отримання додаткової інформації."
msgid "The shape array is read-only for the consumer."
msgstr "Масив форм доступний лише для читання для споживача."
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:type:`Py_ssize_t` довжини :c:member:`~Py_buffer.ndim`, що вказує "
"кількість байтів, які потрібно пропустити, щоб перейти до нового елемента в "
"кожному вимірі."
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``. See `complex arrays`_ for further information."
msgstr ""
"Величина кроку може бути будь-яким цілим числом. Для звичайних масивів кроки "
"зазвичай позитивні, але споживач ПОВИНЕН вміти впоратися з випадком "
"``ступені[n] <= 0``. Див. `complex arrays`_ для отримання додаткової "
"інформації."
msgid "The strides array is read-only for the consumer."
msgstr "Масив strides доступний лише для читання для споживача."
msgid ""
"An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`. If "
"``suboffsets[n] >= 0``, the values stored along the nth dimension are "
"pointers and the suboffset value dictates how many bytes to add to each "
"pointer after de-referencing. A suboffset value that is negative indicates "
"that no de-referencing should occur (striding in a contiguous memory block)."
msgstr ""
"Масив :c:type:`Py_ssize_t` довжини :c:member:`~Py_buffer.ndim`. Якщо "
"``suboffsets[n] >= 0``, значення, що зберігаються вздовж n-го виміру, є "
"вказівниками, а значення suboffset визначає, скільки байтів потрібно додати "
"до кожного покажчика після видалення посилань. Від’ємне значення субзміщення "
"вказує на те, що не повинно відбуватися видалення посилань (переміщення в "
"безперервному блоці пам’яті)."
msgid ""
"If all suboffsets are negative (i.e. no de-referencing is needed), then this "
"field must be ``NULL`` (the default value)."
msgstr ""
"Якщо всі підзміщення є від’ємними (тобто не потрібно знімати посилання), "
"тоді це поле має бути ``NULL`` (значення за замовчуванням)."
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 ""
"Цей тип представлення масиву використовується бібліотекою зображень Python "
"(PIL). Див. `complex arrays`_ для отримання додаткової інформації про доступ "
"до елементів такого масиву."
msgid "The suboffsets array is read-only for the consumer."
msgstr "Масив suboffsets доступний лише для читання для споживача."
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 ""
"Це для внутрішнього використання об’єктом експорту. Наприклад, це може бути "
"перетворено як ціле число експортером і використано для зберігання прапорів "
"про те, чи потрібно звільняти масиви форми, кроків і підзміщень, коли буфер "
"звільняється. Споживач НЕ ПОВИНЕН змінювати це значення."
msgid "Constants:"
msgstr ""
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 ""
msgid "Buffer request types"
msgstr "Типи запитів на буфер"
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`. Оскільки складність логічної "
"структури пам’яті може різко змінюватися, споживач використовує аргумент "
"*flags*, щоб визначити точний тип буфера, який він може обробляти."
msgid ""
"All :c:type:`Py_buffer` fields are unambiguously defined by the request type."
msgstr ""
msgid "request-independent fields"
msgstr "поля, незалежні від запиту"
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 ""
"На наступні поля не впливають *прапорці*, і їх потрібно завжди заповнювати "
"правильними значеннями: :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`."
msgid "readonly, format"
msgstr "тільки для читання, формат"
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 ""
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``."
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` можна використовувати як окремий прапор для запиту "
"простого буфера для запису."
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 ""
msgid "shape, strides, suboffsets"
msgstr "форма, кроки, підзміщення"
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 ""
"Прапори, які керують логічною структурою пам'яті, перераховані в порядку "
"зменшення складності. Зауважте, що кожен прапор містить усі біти прапорів "
"під ним."
msgid "Request"
msgstr "запит"
msgid "shape"
msgstr "форму"
msgid "strides"
msgstr "кроками"
msgid "suboffsets"
msgstr "підзміщення"
msgid "yes"
msgstr "так"
msgid "if needed"
msgstr "при необхідності"
msgid "NULL"
msgstr "НУЛЬ"
msgid "contiguity requests"
msgstr "запити суміжності"
msgid ""
"C or Fortran :term:`contiguity <contiguous>` can be explicitly requested, "
"with and without stride information. Without stride information, the buffer "
"must be C-contiguous."
msgstr ""
"C або Fortran :term:`contiguity <contiguous>` можна запитати явно, з "
"інформацією про крок або без неї. Без інформації про кроки буфер має бути C-"
"суміжним."
msgid "contig"
msgstr "контиг"
msgid "C"
msgstr "C"
msgid "F"
msgstr "Ф"
msgid "C or F"
msgstr "C або F"
msgid ":c:macro:`PyBUF_ND`"
msgstr ":c:macro:`PyBUF_ND`"
msgid "compound requests"
msgstr "складені запити"
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 ""
"Усі можливі запити повністю визначені деякою комбінацією прапорів у "
"попередньому розділі. Для зручності протокол буфера надає часто "
"використовувані комбінації як окремі прапорці."
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`, щоб визначити суміжність."
msgid "readonly"
msgstr "лише для читання"
msgid "format"
msgstr "формат"
msgid "U"
msgstr "U"
msgid "0"
msgstr "0"
msgid "1 or 0"
msgstr "1 або 0"
msgid "Complex arrays"
msgstr "Складні масиви"
msgid "NumPy-style: shape and strides"
msgstr "NumPy-стиль: форма та кроки"
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`."
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``."
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-вимірного масиву наступним чином:"
msgid ""
"ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * "
"strides[n-1];\n"
"item = *((typeof(item) *)ptr);"
msgstr ""
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` може вказувати на будь-яке "
"місце в межах фактичного блоку пам’яті. Експортер може перевірити дійсність "
"буфера за допомогою цієї функції:"
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 <= 0:\n"
" return ndim == 0 and not shape and not strides\n"
" if 0 in shape:\n"
" return True\n"
"\n"
" imin = sum(strides[j]*(shape[j]-1) for j in range(ndim)\n"
" if strides[j] <= 0)\n"
" imax = sum(strides[j]*(shape[j]-1) for j in range(ndim)\n"
" if strides[j] > 0)\n"
"\n"
" return 0 <= offset+imin and offset+imax+itemsize <= memlen"
msgstr ""
msgid "PIL-style: shape, strides and suboffsets"
msgstr "PIL-стиль: форма, кроки та підзміщення"
msgid ""
"In addition to the regular items, PIL-style arrays can contain pointers that "
"must be followed in order to get to the next element in a dimension. For "
"example, the regular three-dimensional C-array ``char v[2][2][3]`` can also "
"be viewed as an array of 2 pointers to 2 two-dimensional arrays: ``char "
"(*v[2])[2][3]``. In suboffsets representation, those two pointers can be "
"embedded at the start of :c:member:`~Py_buffer.buf`, pointing to two ``char "
"x[2][3]`` arrays that can be located anywhere in memory."
msgstr ""
"Окрім звичайних елементів, масиви у стилі PIL можуть містити вказівники, за "
"якими потрібно слідувати, щоб перейти до наступного елемента у вимірі. "
"Наприклад, звичайний тривимірний C-масив ``char v[2][2][3]`` також можна "
"розглядати як масив із 2 покажчиків на 2 двовимірні масиви: ``char (*v[ 2])"
"[2][3]``. У представленні субзсувів ці два вказівники можуть бути вбудовані "
"на початку :c:member:`~Py_buffer.buf`, вказуючи на два масиви ``char x[2]"
"[3]``, які можуть бути розташовані будь-де в пам’яті."
msgid ""
"Here is a function that returns a pointer to the element in an N-D array "
"pointed to by an N-dimensional index when there are both non-``NULL`` "
"strides and suboffsets::"
msgstr ""
"Ось функція, яка повертає вказівник на елемент у N-D масиві, на який вказує "
"N-вимірний індекс, коли є як кроки, так і підзміщення, відмінні від "
"``NULL``::"
msgid ""
"void *get_item_pointer(int ndim, void *buf, Py_ssize_t *strides,\n"
" Py_ssize_t *suboffsets, Py_ssize_t *indices) {\n"
" char *pointer = (char*)buf;\n"
" int i;\n"
" for (i = 0; i < ndim; i++) {\n"
" pointer += strides[i] * indices[i];\n"
" if (suboffsets[i] >=0 ) {\n"
" pointer = *((char**)pointer) + suboffsets[i];\n"
" }\n"
" }\n"
" return (void*)pointer;\n"
"}"
msgstr ""
msgid "Buffer-related functions"
msgstr "Функції, пов'язані з буфером"
msgid ""
"Return ``1`` if *obj* supports the buffer interface otherwise ``0``. When "
"``1`` is returned, it doesn't guarantee that :c:func:`PyObject_GetBuffer` "
"will succeed. This function always succeeds."
msgstr ""
"Повертає ``1``, якщо *obj* підтримує інтерфейс буфера, інакше ``0``. Коли "
"повертається ``1``, це не гарантує, що :c:func:`PyObject_GetBuffer` буде "
"успішним. Ця функція завжди успішна."
msgid ""
"Send a request to *exporter* to fill in *view* as specified by *flags*. If "
"the exporter cannot provide a buffer of the exact type, it MUST raise :exc:"
"`BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``."
msgstr ""
msgid ""
"On success, fill in *view*, set ``view->obj`` to a new reference to "
"*exporter* and return 0. In the case of chained buffer providers that "
"redirect requests to a single object, ``view->obj`` MAY refer to this object "
"instead of *exporter* (See :ref:`Buffer Object Structures <buffer-structs>`)."
msgstr ""
"У разі успіху заповніть *view*, встановіть ``view->obj`` на нове посилання "
"на *exporter* і поверніть 0. У випадку зв’язаних постачальників буферів, які "
"перенаправляють запити до одного об’єкта, ``view-> obj`` МОЖЕ посилатися на "
"цей об’єкт замість *exporter* (Див. :ref:`Структури об’єктів буфера <buffer-"
"structs>`)."
msgid ""
"Successful calls to :c:func:`PyObject_GetBuffer` must be paired with calls "
"to :c:func:`PyBuffer_Release`, similar to :c:func:`malloc` and :c:func:"
"`free`. Thus, after the consumer is done with the buffer, :c:func:"
"`PyBuffer_Release` must be called exactly once."
msgstr ""
"Успішні виклики :c:func:`PyObject_GetBuffer` повинні бути поєднані з "
"викликами :c:func:`PyBuffer_Release`, подібно до :c:func:`malloc` і :c:func:"
"`free`. Таким чином, після того, як споживач завершить роботу з буфером, :c:"
"func:`PyBuffer_Release` потрібно викликати рівно один раз."
msgid ""
"Release the buffer *view* and release the :term:`strong reference` (i.e. "
"decrement the reference count) to the view's supporting object, ``view-"
">obj``. This function MUST be called when the buffer is no longer being "
"used, otherwise reference leaks may occur."
msgstr ""
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`, є помилкою."
msgid ""
"Return the implied :c:member:`~Py_buffer.itemsize` from :c:member:"
"`~Py_buffer.format`. On error, raise an exception and return -1."
msgstr ""
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 ""
"Повертає ``1``, якщо пам’ять, визначена *view*, є стилем C (*order* це "
"``'C''``) або стилем Fortran (*order* це ``'F'``) :term:`contiguous` або "
"один (*порядок* це ``'A'``). Інакше поверніть ``0``. Ця функція завжди "
"успішна."
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->ndim``."
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 ""
"Скопіюйте послідовні *len* байти з *buf* у *view*. *fort* може бути ``'C'`` "
"або ``'F'`` (для впорядкування у стилі C або Fortran). ``0`` повертається в "
"разі успіху, ``-1`` у разі помилки."
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 ""
"Скопіюйте *len* байти з *src* до його безперервного представлення в *buf*. "
"*order* може бути ``'C'`` або ``'F'`` або ``'A'`` (для впорядкування в стилі "
"C або Fortran або будь-якого з них). ``0`` повертається в разі успіху, "
"``-1`` у разі помилки."
msgid "This function fails if *len* != *src->len*."
msgstr "Ця функція не працює, якщо *len* != *src->len*."
msgid ""
"Copy data from *src* to *dest* buffer. Can convert between C-style and or "
"Fortran-style buffers."
msgstr ""
msgid "``0`` is returned on success, ``-1`` on error."
msgstr ""
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* байтовими кроками :term:`contiguous` (у стилі C, "
"якщо *order* має значення ``'C'``, або у стилі Fortran, якщо *order* має "
"значення ``'F'`` ) масив заданої форми із заданою кількістю байтів на "
"елемент."
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 ""
"Обробляти запити буфера для експортера, який хоче відкрити *buf* розміру "
"*len* із можливістю запису, встановленою відповідно до *readonly*. *buf* "
"інтерпретується як послідовність байтів без знаку."
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* вказує на тип запиту. Ця функція завжди заповнює *view*, як "
"зазначено прапорцями, якщо *buf* не призначено лише для читання і :c:macro:"
"`PyBUF_WRITABLE` встановлено у *flags*."
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 ""
msgid ""
"If this function is used as part of a :ref:`getbufferproc <buffer-structs>`, "
"*exporter* MUST be set to the exporting object and *flags* must be passed "
"unmodified. Otherwise, *exporter* MUST be ``NULL``."
msgstr ""
"Якщо ця функція використовується як частина :ref:`getbufferproc <buffer-"
"structs>`, *exporter* ПОВИНЕН бути встановлений на об’єкт експорту, а "
"*flags* мають бути передані без змін. В іншому випадку *exporter* ПОВИНЕН "
"бути ``NULL``."
msgid "buffer protocol"
msgstr ""
msgid "buffer interface"
msgstr ""
msgid "(see buffer protocol)"
msgstr ""
msgid "buffer object"
msgstr ""
msgid "PyBufferProcs (C type)"
msgstr ""
msgid "contiguous"
msgstr "суміжний"
msgid "C-contiguous"
msgstr ""
msgid "Fortran contiguous"
msgstr ""