biotite 0.39.0__cp310-cp310-macosx_11_0_arm64.whl → 0.40.0__cp310-cp310-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of biotite might be problematic. Click here for more details.
- biotite/__init__.py +3 -3
- biotite/application/dssp/app.py +18 -18
- biotite/database/rcsb/download.py +19 -14
- biotite/sequence/align/banded.c +258 -237
- biotite/sequence/align/banded.cpython-310-darwin.so +0 -0
- biotite/sequence/align/kmeralphabet.c +243 -222
- biotite/sequence/align/kmeralphabet.cpython-310-darwin.so +0 -0
- biotite/sequence/align/kmersimilarity.c +215 -196
- biotite/sequence/align/kmersimilarity.cpython-310-darwin.so +0 -0
- biotite/sequence/align/kmertable.cpp +233 -205
- biotite/sequence/align/kmertable.cpython-310-darwin.so +0 -0
- biotite/sequence/align/localgapped.c +258 -237
- biotite/sequence/align/localgapped.cpython-310-darwin.so +0 -0
- biotite/sequence/align/localungapped.c +235 -214
- biotite/sequence/align/localungapped.cpython-310-darwin.so +0 -0
- biotite/sequence/align/multiple.c +255 -234
- biotite/sequence/align/multiple.cpython-310-darwin.so +0 -0
- biotite/sequence/align/pairwise.c +274 -253
- biotite/sequence/align/pairwise.cpython-310-darwin.so +0 -0
- biotite/sequence/align/permutation.c +215 -196
- biotite/sequence/align/permutation.cpython-310-darwin.so +0 -0
- biotite/sequence/align/selector.c +217 -197
- biotite/sequence/align/selector.cpython-310-darwin.so +0 -0
- biotite/sequence/align/tracetable.c +215 -195
- biotite/sequence/align/tracetable.cpython-310-darwin.so +0 -0
- biotite/sequence/codec.c +235 -214
- biotite/sequence/codec.cpython-310-darwin.so +0 -0
- biotite/sequence/phylo/nj.c +215 -196
- biotite/sequence/phylo/nj.cpython-310-darwin.so +0 -0
- biotite/sequence/phylo/tree.c +227 -202
- biotite/sequence/phylo/tree.cpython-310-darwin.so +0 -0
- biotite/sequence/phylo/upgma.c +215 -196
- biotite/sequence/phylo/upgma.cpython-310-darwin.so +0 -0
- biotite/structure/basepairs.py +7 -12
- biotite/structure/bonds.c +1175 -1226
- biotite/structure/bonds.cpython-310-darwin.so +0 -0
- biotite/structure/celllist.c +217 -197
- biotite/structure/celllist.cpython-310-darwin.so +0 -0
- biotite/structure/charges.c +1052 -1101
- biotite/structure/charges.cpython-310-darwin.so +0 -0
- biotite/structure/filter.py +30 -37
- biotite/structure/info/__init__.py +5 -8
- biotite/structure/info/atoms.py +25 -67
- biotite/structure/info/bonds.py +46 -100
- biotite/structure/info/ccd/README.rst +8 -0
- biotite/structure/info/ccd/amino_acids.txt +1646 -0
- biotite/structure/info/ccd/carbohydrates.txt +1133 -0
- biotite/structure/info/ccd/components.bcif +0 -0
- biotite/structure/info/ccd/nucleotides.txt +797 -0
- biotite/structure/info/ccd.py +95 -0
- biotite/structure/info/groups.py +90 -0
- biotite/structure/info/masses.py +21 -20
- biotite/structure/info/misc.py +11 -22
- biotite/structure/info/standardize.py +17 -12
- biotite/structure/io/__init__.py +2 -4
- biotite/structure/io/ctab.py +1 -1
- biotite/structure/io/general.py +37 -43
- biotite/structure/io/mmtf/__init__.py +3 -0
- biotite/structure/io/mmtf/convertarray.c +219 -198
- biotite/structure/io/mmtf/convertarray.cpython-310-darwin.so +0 -0
- biotite/structure/io/mmtf/convertfile.c +217 -197
- biotite/structure/io/mmtf/convertfile.cpython-310-darwin.so +0 -0
- biotite/structure/io/mmtf/decode.c +225 -204
- biotite/structure/io/mmtf/decode.cpython-310-darwin.so +0 -0
- biotite/structure/io/mmtf/encode.c +215 -196
- biotite/structure/io/mmtf/encode.cpython-310-darwin.so +0 -0
- biotite/structure/io/mmtf/file.py +34 -26
- biotite/structure/io/npz/__init__.py +3 -0
- biotite/structure/io/npz/file.py +21 -18
- biotite/structure/io/pdb/__init__.py +3 -3
- biotite/structure/io/pdb/file.py +5 -3
- biotite/structure/io/pdb/hybrid36.c +63 -43
- biotite/structure/io/pdb/hybrid36.cpython-310-darwin.so +0 -0
- biotite/structure/io/pdbqt/file.py +32 -32
- biotite/structure/io/pdbx/__init__.py +13 -6
- biotite/structure/io/pdbx/bcif.py +649 -0
- biotite/structure/io/pdbx/cif.py +1028 -0
- biotite/structure/io/pdbx/component.py +243 -0
- biotite/structure/io/pdbx/convert.py +707 -359
- biotite/structure/io/pdbx/encoding.c +112813 -0
- biotite/structure/io/pdbx/encoding.cpython-310-darwin.so +0 -0
- biotite/structure/io/pdbx/error.py +14 -0
- biotite/structure/io/pdbx/legacy.py +267 -0
- biotite/structure/molecules.py +151 -151
- biotite/structure/sasa.c +215 -196
- biotite/structure/sasa.cpython-310-darwin.so +0 -0
- biotite/structure/superimpose.py +158 -115
- {biotite-0.39.0.dist-info → biotite-0.40.0.dist-info}/METADATA +2 -2
- {biotite-0.39.0.dist-info → biotite-0.40.0.dist-info}/RECORD +92 -90
- {biotite-0.39.0.dist-info → biotite-0.40.0.dist-info}/WHEEL +1 -1
- biotite/structure/info/amino_acids.json +0 -1556
- biotite/structure/info/amino_acids.py +0 -42
- biotite/structure/info/carbohydrates.json +0 -1122
- biotite/structure/info/carbohydrates.py +0 -39
- biotite/structure/info/intra_bonds.msgpack +0 -0
- biotite/structure/info/link_types.msgpack +0 -1
- biotite/structure/info/nucleotides.json +0 -772
- biotite/structure/info/nucleotides.py +0 -39
- biotite/structure/info/residue_masses.msgpack +0 -0
- biotite/structure/info/residue_names.msgpack +0 -3
- biotite/structure/info/residues.msgpack +0 -0
- biotite/structure/io/pdbx/file.py +0 -652
- {biotite-0.39.0.dist-info → biotite-0.40.0.dist-info}/LICENSE.rst +0 -0
- {biotite-0.39.0.dist-info → biotite-0.40.0.dist-info}/top_level.txt +0 -0
|
Binary file
|
|
@@ -12,6 +12,7 @@ import struct
|
|
|
12
12
|
import copy
|
|
13
13
|
import numpy as np
|
|
14
14
|
import msgpack
|
|
15
|
+
import warnings
|
|
15
16
|
from ....file import File, is_binary, is_open_compatible
|
|
16
17
|
from ...error import BadStructureError
|
|
17
18
|
from .decode import decode_array
|
|
@@ -21,7 +22,7 @@ from .encode import encode_array
|
|
|
21
22
|
class MMTFFile(File, MutableMapping):
|
|
22
23
|
"""
|
|
23
24
|
This class represents a MMTF file.
|
|
24
|
-
|
|
25
|
+
|
|
25
26
|
When reading a file, the *MessagePack* unpacker is used to create
|
|
26
27
|
a dictionary of the file content.
|
|
27
28
|
This dictionary is accessed by indexing the :class:`MMTFFile`
|
|
@@ -29,10 +30,13 @@ class MMTFFile(File, MutableMapping):
|
|
|
29
30
|
If the dictionary value is an encoded array, the value automatically
|
|
30
31
|
decoded.
|
|
31
32
|
Decoded arrays are always returned as :class:`ndarray` instances.
|
|
32
|
-
|
|
33
|
+
|
|
34
|
+
DEPRECATED: Use :class:`biotite.structure.io.pdbx.BinaryCIFFile`
|
|
35
|
+
instead.
|
|
36
|
+
|
|
33
37
|
Examples
|
|
34
38
|
--------
|
|
35
|
-
|
|
39
|
+
|
|
36
40
|
>>> import os.path
|
|
37
41
|
>>> mmtf_file = MMTFFile.read(os.path.join(path_to_structures, "1l2y.mmtf"))
|
|
38
42
|
>>> print(mmtf_file["title"])
|
|
@@ -42,24 +46,28 @@ class MMTFFile(File, MutableMapping):
|
|
|
42
46
|
'A' 'A' 'A' 'A' 'A' 'A' 'A' 'A' 'A' 'A' 'A' 'A' 'A' 'A' 'A' 'A' 'A' 'A'
|
|
43
47
|
'A' 'A']
|
|
44
48
|
"""
|
|
45
|
-
|
|
49
|
+
|
|
46
50
|
def __init__(self):
|
|
51
|
+
warnings.warn(
|
|
52
|
+
"'MMTFFile' is deprecated, use 'BinaryCIFFile' instead",
|
|
53
|
+
DeprecationWarning
|
|
54
|
+
)
|
|
47
55
|
super().__init__()
|
|
48
56
|
self._content = {}
|
|
49
57
|
self._content["mmtfVersion"] = "1.0.0"
|
|
50
58
|
self._content["mmtfProducer"] = "UNKNOWN"
|
|
51
|
-
|
|
59
|
+
|
|
52
60
|
@classmethod
|
|
53
61
|
def read(self, file):
|
|
54
62
|
"""
|
|
55
63
|
Read a MMTF file.
|
|
56
|
-
|
|
64
|
+
|
|
57
65
|
Parameters
|
|
58
66
|
----------
|
|
59
67
|
file : file-like object or str
|
|
60
68
|
The file to be read.
|
|
61
69
|
Alternatively a file path can be supplied.
|
|
62
|
-
|
|
70
|
+
|
|
63
71
|
Returns
|
|
64
72
|
-------
|
|
65
73
|
file_object : MMTFFile
|
|
@@ -80,11 +88,11 @@ class MMTFFile(File, MutableMapping):
|
|
|
80
88
|
file.read(), use_list=True, raw=False
|
|
81
89
|
)
|
|
82
90
|
return mmtf_file
|
|
83
|
-
|
|
91
|
+
|
|
84
92
|
def write(self, file):
|
|
85
93
|
"""
|
|
86
94
|
Write contents into a MMTF file.
|
|
87
|
-
|
|
95
|
+
|
|
88
96
|
Parameters
|
|
89
97
|
----------
|
|
90
98
|
file : file-like object or str
|
|
@@ -101,20 +109,20 @@ class MMTFFile(File, MutableMapping):
|
|
|
101
109
|
if not is_binary(file):
|
|
102
110
|
raise TypeError("A file opened in 'binary' mode is required")
|
|
103
111
|
file.write(packed_bytes)
|
|
104
|
-
|
|
112
|
+
|
|
105
113
|
def __copy_fill__(self, clone):
|
|
106
114
|
super().__copy_fill__(clone)
|
|
107
115
|
clone._content = copy.deepcopy(self._content)
|
|
108
|
-
|
|
116
|
+
|
|
109
117
|
def get_codec(self, key):
|
|
110
118
|
"""
|
|
111
119
|
Obtain the codec ID of an MMTF encoded value.
|
|
112
|
-
|
|
120
|
+
|
|
113
121
|
Parameters
|
|
114
122
|
----------
|
|
115
123
|
key : str
|
|
116
124
|
The key for the potentially encoded value.
|
|
117
|
-
|
|
125
|
+
|
|
118
126
|
Returns
|
|
119
127
|
-------
|
|
120
128
|
codec : int or None
|
|
@@ -126,16 +134,16 @@ class MMTFFile(File, MutableMapping):
|
|
|
126
134
|
return codec
|
|
127
135
|
else:
|
|
128
136
|
return None
|
|
129
|
-
|
|
137
|
+
|
|
130
138
|
def get_length(self, key):
|
|
131
139
|
"""
|
|
132
140
|
Obtain the length of an MMTF encoded value.
|
|
133
|
-
|
|
141
|
+
|
|
134
142
|
Parameters
|
|
135
143
|
----------
|
|
136
144
|
key : str
|
|
137
145
|
The key for the potentially encoded value.
|
|
138
|
-
|
|
146
|
+
|
|
139
147
|
Returns
|
|
140
148
|
-------
|
|
141
149
|
codec : int or None
|
|
@@ -148,16 +156,16 @@ class MMTFFile(File, MutableMapping):
|
|
|
148
156
|
return length
|
|
149
157
|
else:
|
|
150
158
|
return None
|
|
151
|
-
|
|
159
|
+
|
|
152
160
|
def get_param(self, key):
|
|
153
161
|
"""
|
|
154
162
|
Obtain the parameter of an MMTF encoded value.
|
|
155
|
-
|
|
163
|
+
|
|
156
164
|
Parameters
|
|
157
165
|
----------
|
|
158
166
|
key : str
|
|
159
167
|
The key for the potentially encoded value.
|
|
160
|
-
|
|
168
|
+
|
|
161
169
|
Returns
|
|
162
170
|
-------
|
|
163
171
|
codec : int or None
|
|
@@ -170,7 +178,7 @@ class MMTFFile(File, MutableMapping):
|
|
|
170
178
|
return param
|
|
171
179
|
else:
|
|
172
180
|
return None
|
|
173
|
-
|
|
181
|
+
|
|
174
182
|
def set_array(self, key, array, codec, param=0):
|
|
175
183
|
length = len(array)
|
|
176
184
|
raw_bytes = encode_array(array, codec, param)
|
|
@@ -179,7 +187,7 @@ class MMTFFile(File, MutableMapping):
|
|
|
179
187
|
+ struct.pack(">i", param) \
|
|
180
188
|
+ raw_bytes
|
|
181
189
|
self._content[key] = data
|
|
182
|
-
|
|
190
|
+
|
|
183
191
|
def __getitem__(self, key):
|
|
184
192
|
data = self._content[key]
|
|
185
193
|
if isinstance(data, bytes) and data[0] == 0:
|
|
@@ -191,22 +199,22 @@ class MMTFFile(File, MutableMapping):
|
|
|
191
199
|
return decode_array(codec, raw_bytes, param)
|
|
192
200
|
else:
|
|
193
201
|
return data
|
|
194
|
-
|
|
202
|
+
|
|
195
203
|
def __setitem__(self, key, item):
|
|
196
204
|
if isinstance(item, np.ndarray):
|
|
197
205
|
raise TypeError("Arrays that need to be encoded must be addeed "
|
|
198
206
|
"via 'set_array()'")
|
|
199
207
|
self._content[key] = item
|
|
200
|
-
|
|
208
|
+
|
|
201
209
|
def __delitem__(self, key):
|
|
202
210
|
del self._content[key]
|
|
203
|
-
|
|
211
|
+
|
|
204
212
|
def __iter__(self):
|
|
205
213
|
return self._content.__iter__()
|
|
206
|
-
|
|
214
|
+
|
|
207
215
|
def __len__(self):
|
|
208
216
|
return len(self._content)
|
|
209
|
-
|
|
217
|
+
|
|
210
218
|
def __contains__(self, item):
|
|
211
219
|
return item in self._content
|
|
212
220
|
|
|
@@ -9,6 +9,9 @@ format is used to store `NumPy` arrays. Since atom arrays and stacks are
|
|
|
9
9
|
completely built on `NumPy` arrays, this format is preferable for
|
|
10
10
|
Biotite internal usage due to fast I/O operations and preservation
|
|
11
11
|
of all atom annotation arrays.
|
|
12
|
+
|
|
13
|
+
DEPRECATED: Pickle data directly or use
|
|
14
|
+
:class:`biotite.structure.io.pdbx.BinaryCIFFile` instead.
|
|
12
15
|
"""
|
|
13
16
|
|
|
14
17
|
__name__ = "biotite.structure.io.npz"
|
biotite/structure/io/npz/file.py
CHANGED
|
@@ -15,19 +15,22 @@ from ....file import File, is_binary
|
|
|
15
15
|
class NpzFile(File):
|
|
16
16
|
r"""
|
|
17
17
|
This class represents a NPZ file, the preferable format for
|
|
18
|
-
Biotite internal structure storage.
|
|
19
|
-
|
|
18
|
+
Biotite internal structure storage.
|
|
19
|
+
|
|
20
20
|
Internally the this class writes/reads all attribute arrays of an
|
|
21
21
|
:class:`AtomArray` or :class:`AtomArrayStack` using the *NumPy*
|
|
22
22
|
:func:`save()`/:func:`load()`
|
|
23
23
|
method. This format offers the fastest I/O operations and completely
|
|
24
24
|
preserves the content all atom annotation arrays.
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
DEPRECATED: Pickle data directly or use
|
|
27
|
+
:class:`biotite.structure.io.pdbx.BinaryCIFFile` instead.
|
|
28
|
+
|
|
26
29
|
Examples
|
|
27
30
|
--------
|
|
28
31
|
Load a \\*.npz file, modify the structure and save the new
|
|
29
32
|
structure into a new file:
|
|
30
|
-
|
|
33
|
+
|
|
31
34
|
>>> import os.path
|
|
32
35
|
>>> file = NpzFile.read(os.path.join(path_to_structures, "1l2y.npz"))
|
|
33
36
|
>>> array_stack = file.get_structure()
|
|
@@ -35,30 +38,30 @@ class NpzFile(File):
|
|
|
35
38
|
>>> file = NpzFile()
|
|
36
39
|
>>> file.set_structure(array_stack_mod)
|
|
37
40
|
>>> file.write(os.path.join(path_to_directory, "1l2y_mod.npz"))
|
|
38
|
-
|
|
41
|
+
|
|
39
42
|
"""
|
|
40
|
-
|
|
43
|
+
|
|
41
44
|
def __init__(self):
|
|
42
45
|
super().__init__()
|
|
43
46
|
self._data_dict = None
|
|
44
|
-
|
|
47
|
+
|
|
45
48
|
def __copy_fill__(self, clone):
|
|
46
49
|
super().__copy_fill__(clone)
|
|
47
50
|
if self._data_dict is not None:
|
|
48
51
|
for key, value in self._data_dict.items():
|
|
49
52
|
clone._data_dict[key] = np.copy(value)
|
|
50
|
-
|
|
53
|
+
|
|
51
54
|
@classmethod
|
|
52
55
|
def read(cls, file):
|
|
53
56
|
"""
|
|
54
57
|
Read a NPZ file.
|
|
55
|
-
|
|
58
|
+
|
|
56
59
|
Parameters
|
|
57
60
|
----------
|
|
58
61
|
file : file-like object or str
|
|
59
62
|
The file to be read.
|
|
60
63
|
Alternatively a file path can be supplied.
|
|
61
|
-
|
|
64
|
+
|
|
62
65
|
Returns
|
|
63
66
|
-------
|
|
64
67
|
file_object : NPZFile
|
|
@@ -75,11 +78,11 @@ class NpzFile(File):
|
|
|
75
78
|
raise TypeError("A file opened in 'binary' mode is required")
|
|
76
79
|
npz_file._data_dict = dict(np.load(file, allow_pickle=False))
|
|
77
80
|
return npz_file
|
|
78
|
-
|
|
81
|
+
|
|
79
82
|
def write(self, file):
|
|
80
83
|
"""
|
|
81
84
|
Write a NPZ file.
|
|
82
|
-
|
|
85
|
+
|
|
83
86
|
Parameters
|
|
84
87
|
----------
|
|
85
88
|
file : file-like object or str
|
|
@@ -93,15 +96,15 @@ class NpzFile(File):
|
|
|
93
96
|
if not is_binary(file):
|
|
94
97
|
raise TypeError("A file opened in 'binary' mode is required")
|
|
95
98
|
np.savez(file, **self._data_dict)
|
|
96
|
-
|
|
99
|
+
|
|
97
100
|
def get_structure(self):
|
|
98
101
|
"""
|
|
99
102
|
Get an :class:`AtomArray` or :class:`AtomArrayStack` from the
|
|
100
103
|
file.
|
|
101
|
-
|
|
104
|
+
|
|
102
105
|
If this method returns an array or stack depends on which type
|
|
103
106
|
of object was used when the file was written.
|
|
104
|
-
|
|
107
|
+
|
|
105
108
|
Returns
|
|
106
109
|
-------
|
|
107
110
|
array : AtomArray or AtomArrayStack
|
|
@@ -117,7 +120,7 @@ class NpzFile(File):
|
|
|
117
120
|
array = AtomArrayStack(coord.shape[0], coord.shape[1])
|
|
118
121
|
else:
|
|
119
122
|
array = AtomArray(coord.shape[0])
|
|
120
|
-
|
|
123
|
+
|
|
121
124
|
for key, value in self._data_dict.items():
|
|
122
125
|
if key == "coord":
|
|
123
126
|
array.coord = value
|
|
@@ -128,12 +131,12 @@ class NpzFile(File):
|
|
|
128
131
|
else:
|
|
129
132
|
array.set_annotation(key, value)
|
|
130
133
|
return array
|
|
131
|
-
|
|
134
|
+
|
|
132
135
|
def set_structure(self, array):
|
|
133
136
|
"""
|
|
134
137
|
Set the :class:`AtomArray` or :class:`AtomArrayStack` for the
|
|
135
138
|
file.
|
|
136
|
-
|
|
139
|
+
|
|
137
140
|
Parameters
|
|
138
141
|
----------
|
|
139
142
|
array : AtomArray or AtomArrayStack
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
This subpackage is used for reading and writing an :class:`AtomArray` or
|
|
7
7
|
:class:`AtomArrayStack` using the popular PDB format.
|
|
8
8
|
Since this format has some limitations, it will be completely replaced
|
|
9
|
-
someday by the modern PDBx
|
|
9
|
+
someday by the modern PDBx format.
|
|
10
10
|
Therefore this subpackage should only be used, if usage of the
|
|
11
|
-
PDBx
|
|
11
|
+
PDBx (CIF or BinaryCIF) format is not suitable (e.g. when interfacing
|
|
12
12
|
other software).
|
|
13
|
-
In all other cases, usage of the
|
|
13
|
+
In all other cases, usage of the :mod:`pdbx` subpackage is encouraged.
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
16
|
__name__ = "biotite.structure.io.pdb"
|
biotite/structure/io/pdb/file.py
CHANGED
|
@@ -53,7 +53,8 @@ class PDBFile(TextFile):
|
|
|
53
53
|
r"""
|
|
54
54
|
This class represents a PDB file.
|
|
55
55
|
|
|
56
|
-
The usage of
|
|
56
|
+
The usage of :mod:`biotite.structure.io.pdbx` is encouraged in favor
|
|
57
|
+
of this class.
|
|
57
58
|
|
|
58
59
|
This class only provides support for reading/writing the pure atom
|
|
59
60
|
information (*ATOM*, *HETATM*, *MODEL* and *ENDMDL* records). *TER*
|
|
@@ -62,7 +63,8 @@ class PDBFile(TextFile):
|
|
|
62
63
|
|
|
63
64
|
See also
|
|
64
65
|
--------
|
|
65
|
-
|
|
66
|
+
CIFFile
|
|
67
|
+
BinaryCIFFile
|
|
66
68
|
|
|
67
69
|
Examples
|
|
68
70
|
--------
|
|
@@ -510,7 +512,7 @@ class PDBFile(TextFile):
|
|
|
510
512
|
warnings.warn(
|
|
511
513
|
"File contains invalid 'CRYST1' record, box is ignored"
|
|
512
514
|
)
|
|
513
|
-
|
|
515
|
+
break
|
|
514
516
|
|
|
515
517
|
if isinstance(array, AtomArray):
|
|
516
518
|
array.box = box
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated by Cython 3.0.
|
|
1
|
+
/* Generated by Cython 3.0.10 */
|
|
2
2
|
|
|
3
3
|
/* BEGIN: Cython Metadata
|
|
4
4
|
{
|
|
@@ -36,10 +36,10 @@ END: Cython Metadata */
|
|
|
36
36
|
#else
|
|
37
37
|
#define __PYX_EXTRA_ABI_MODULE_NAME ""
|
|
38
38
|
#endif
|
|
39
|
-
#define CYTHON_ABI "
|
|
39
|
+
#define CYTHON_ABI "3_0_10" __PYX_EXTRA_ABI_MODULE_NAME
|
|
40
40
|
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
|
|
41
41
|
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
|
|
42
|
-
#define CYTHON_HEX_VERSION
|
|
42
|
+
#define CYTHON_HEX_VERSION 0x03000AF0
|
|
43
43
|
#define CYTHON_FUTURE_DIVISION 1
|
|
44
44
|
#include <stddef.h>
|
|
45
45
|
#ifndef offsetof
|
|
@@ -131,6 +131,8 @@ END: Cython Metadata */
|
|
|
131
131
|
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
|
|
132
132
|
#define CYTHON_UPDATE_DESCRIPTOR_DOC 0
|
|
133
133
|
#endif
|
|
134
|
+
#undef CYTHON_USE_FREELISTS
|
|
135
|
+
#define CYTHON_USE_FREELISTS 0
|
|
134
136
|
#elif defined(PYPY_VERSION)
|
|
135
137
|
#define CYTHON_COMPILING_IN_PYPY 1
|
|
136
138
|
#define CYTHON_COMPILING_IN_CPYTHON 0
|
|
@@ -192,6 +194,8 @@ END: Cython Metadata */
|
|
|
192
194
|
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
|
|
193
195
|
#define CYTHON_UPDATE_DESCRIPTOR_DOC 0
|
|
194
196
|
#endif
|
|
197
|
+
#undef CYTHON_USE_FREELISTS
|
|
198
|
+
#define CYTHON_USE_FREELISTS 0
|
|
195
199
|
#elif defined(CYTHON_LIMITED_API)
|
|
196
200
|
#ifdef Py_LIMITED_API
|
|
197
201
|
#undef __PYX_LIMITED_VERSION_HEX
|
|
@@ -253,6 +257,8 @@ END: Cython Metadata */
|
|
|
253
257
|
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
|
|
254
258
|
#define CYTHON_UPDATE_DESCRIPTOR_DOC 0
|
|
255
259
|
#endif
|
|
260
|
+
#undef CYTHON_USE_FREELISTS
|
|
261
|
+
#define CYTHON_USE_FREELISTS 0
|
|
256
262
|
#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
|
|
257
263
|
#define CYTHON_COMPILING_IN_PYPY 0
|
|
258
264
|
#define CYTHON_COMPILING_IN_CPYTHON 0
|
|
@@ -262,11 +268,17 @@ END: Cython Metadata */
|
|
|
262
268
|
#ifndef CYTHON_USE_TYPE_SLOTS
|
|
263
269
|
#define CYTHON_USE_TYPE_SLOTS 1
|
|
264
270
|
#endif
|
|
271
|
+
#ifndef CYTHON_USE_TYPE_SPECS
|
|
272
|
+
#define CYTHON_USE_TYPE_SPECS 0
|
|
273
|
+
#endif
|
|
265
274
|
#undef CYTHON_USE_PYTYPE_LOOKUP
|
|
266
275
|
#define CYTHON_USE_PYTYPE_LOOKUP 0
|
|
267
276
|
#ifndef CYTHON_USE_ASYNC_SLOTS
|
|
268
277
|
#define CYTHON_USE_ASYNC_SLOTS 1
|
|
269
278
|
#endif
|
|
279
|
+
#ifndef CYTHON_USE_PYLONG_INTERNALS
|
|
280
|
+
#define CYTHON_USE_PYLONG_INTERNALS 0
|
|
281
|
+
#endif
|
|
270
282
|
#undef CYTHON_USE_PYLIST_INTERNALS
|
|
271
283
|
#define CYTHON_USE_PYLIST_INTERNALS 0
|
|
272
284
|
#ifndef CYTHON_USE_UNICODE_INTERNALS
|
|
@@ -274,8 +286,6 @@ END: Cython Metadata */
|
|
|
274
286
|
#endif
|
|
275
287
|
#undef CYTHON_USE_UNICODE_WRITER
|
|
276
288
|
#define CYTHON_USE_UNICODE_WRITER 0
|
|
277
|
-
#undef CYTHON_USE_PYLONG_INTERNALS
|
|
278
|
-
#define CYTHON_USE_PYLONG_INTERNALS 0
|
|
279
289
|
#ifndef CYTHON_AVOID_BORROWED_REFS
|
|
280
290
|
#define CYTHON_AVOID_BORROWED_REFS 0
|
|
281
291
|
#endif
|
|
@@ -287,11 +297,22 @@ END: Cython Metadata */
|
|
|
287
297
|
#endif
|
|
288
298
|
#undef CYTHON_FAST_THREAD_STATE
|
|
289
299
|
#define CYTHON_FAST_THREAD_STATE 0
|
|
300
|
+
#undef CYTHON_FAST_GIL
|
|
301
|
+
#define CYTHON_FAST_GIL 0
|
|
302
|
+
#ifndef CYTHON_METH_FASTCALL
|
|
303
|
+
#define CYTHON_METH_FASTCALL 1
|
|
304
|
+
#endif
|
|
290
305
|
#undef CYTHON_FAST_PYCALL
|
|
291
306
|
#define CYTHON_FAST_PYCALL 0
|
|
307
|
+
#ifndef CYTHON_PEP487_INIT_SUBCLASS
|
|
308
|
+
#define CYTHON_PEP487_INIT_SUBCLASS 1
|
|
309
|
+
#endif
|
|
292
310
|
#ifndef CYTHON_PEP489_MULTI_PHASE_INIT
|
|
293
311
|
#define CYTHON_PEP489_MULTI_PHASE_INIT 1
|
|
294
312
|
#endif
|
|
313
|
+
#ifndef CYTHON_USE_MODULE_STATE
|
|
314
|
+
#define CYTHON_USE_MODULE_STATE 0
|
|
315
|
+
#endif
|
|
295
316
|
#ifndef CYTHON_USE_TP_FINALIZE
|
|
296
317
|
#define CYTHON_USE_TP_FINALIZE 1
|
|
297
318
|
#endif
|
|
@@ -299,6 +320,12 @@ END: Cython Metadata */
|
|
|
299
320
|
#define CYTHON_USE_DICT_VERSIONS 0
|
|
300
321
|
#undef CYTHON_USE_EXC_INFO_STACK
|
|
301
322
|
#define CYTHON_USE_EXC_INFO_STACK 0
|
|
323
|
+
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
|
|
324
|
+
#define CYTHON_UPDATE_DESCRIPTOR_DOC 1
|
|
325
|
+
#endif
|
|
326
|
+
#ifndef CYTHON_USE_FREELISTS
|
|
327
|
+
#define CYTHON_USE_FREELISTS 0
|
|
328
|
+
#endif
|
|
302
329
|
#else
|
|
303
330
|
#define CYTHON_COMPILING_IN_PYPY 0
|
|
304
331
|
#define CYTHON_COMPILING_IN_CPYTHON 1
|
|
@@ -389,6 +416,9 @@ END: Cython Metadata */
|
|
|
389
416
|
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
|
|
390
417
|
#define CYTHON_UPDATE_DESCRIPTOR_DOC 1
|
|
391
418
|
#endif
|
|
419
|
+
#ifndef CYTHON_USE_FREELISTS
|
|
420
|
+
#define CYTHON_USE_FREELISTS 1
|
|
421
|
+
#endif
|
|
392
422
|
#endif
|
|
393
423
|
#if !defined(CYTHON_FAST_PYCCALL)
|
|
394
424
|
#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
|
|
@@ -581,14 +611,14 @@ END: Cython Metadata */
|
|
|
581
611
|
PyObject *exception_table = NULL;
|
|
582
612
|
PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
|
|
583
613
|
#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
|
|
584
|
-
PyObject *version_info;
|
|
614
|
+
PyObject *version_info;
|
|
585
615
|
PyObject *py_minor_version = NULL;
|
|
586
616
|
#endif
|
|
587
617
|
long minor_version = 0;
|
|
588
618
|
PyObject *type, *value, *traceback;
|
|
589
619
|
PyErr_Fetch(&type, &value, &traceback);
|
|
590
620
|
#if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
|
|
591
|
-
minor_version = 11;
|
|
621
|
+
minor_version = 11;
|
|
592
622
|
#else
|
|
593
623
|
if (!(version_info = PySys_GetObject("version_info"))) goto end;
|
|
594
624
|
if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
|
|
@@ -646,7 +676,7 @@ END: Cython Metadata */
|
|
|
646
676
|
PyObject *fv, PyObject *cell, PyObject* fn,
|
|
647
677
|
PyObject *name, int fline, PyObject *lnos) {
|
|
648
678
|
PyCodeObject *result;
|
|
649
|
-
PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
|
|
679
|
+
PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
|
|
650
680
|
if (!empty_bytes) return NULL;
|
|
651
681
|
result =
|
|
652
682
|
#if PY_VERSION_HEX >= 0x030C0000
|
|
@@ -732,8 +762,13 @@ END: Cython Metadata */
|
|
|
732
762
|
typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
|
|
733
763
|
Py_ssize_t nargs, PyObject *kwnames);
|
|
734
764
|
#else
|
|
735
|
-
#
|
|
736
|
-
#define
|
|
765
|
+
#if PY_VERSION_HEX >= 0x030d00A4
|
|
766
|
+
# define __Pyx_PyCFunctionFast PyCFunctionFast
|
|
767
|
+
# define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
|
|
768
|
+
#else
|
|
769
|
+
# define __Pyx_PyCFunctionFast _PyCFunctionFast
|
|
770
|
+
# define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
|
|
771
|
+
#endif
|
|
737
772
|
#endif
|
|
738
773
|
#if CYTHON_METH_FASTCALL
|
|
739
774
|
#define __Pyx_METH_FASTCALL METH_FASTCALL
|
|
@@ -1085,7 +1120,7 @@ static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict,
|
|
|
1085
1120
|
#define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
|
|
1086
1121
|
#define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
|
|
1087
1122
|
#endif
|
|
1088
|
-
#if
|
|
1123
|
+
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
|
|
1089
1124
|
#define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
|
|
1090
1125
|
#else
|
|
1091
1126
|
static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
|
|
@@ -1172,7 +1207,7 @@ static CYTHON_INLINE float __PYX_NAN() {
|
|
|
1172
1207
|
#endif
|
|
1173
1208
|
|
|
1174
1209
|
#define __PYX_MARK_ERR_POS(f_index, lineno) \
|
|
1175
|
-
{ __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__;
|
|
1210
|
+
{ __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
|
|
1176
1211
|
#define __PYX_ERR(f_index, lineno, Ln_error) \
|
|
1177
1212
|
{ __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
|
|
1178
1213
|
|
|
@@ -1278,24 +1313,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
|
|
|
1278
1313
|
#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
|
|
1279
1314
|
#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
|
|
1280
1315
|
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
|
|
1281
|
-
#if CYTHON_COMPILING_IN_LIMITED_API
|
|
1282
|
-
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const wchar_t *u)
|
|
1283
|
-
{
|
|
1284
|
-
const wchar_t *u_end = u;
|
|
1285
|
-
while (*u_end++) ;
|
|
1286
|
-
return (size_t)(u_end - u - 1);
|
|
1287
|
-
}
|
|
1288
|
-
#else
|
|
1289
|
-
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
|
|
1290
|
-
{
|
|
1291
|
-
const Py_UNICODE *u_end = u;
|
|
1292
|
-
while (*u_end++) ;
|
|
1293
|
-
return (size_t)(u_end - u - 1);
|
|
1294
|
-
}
|
|
1295
|
-
#endif
|
|
1296
1316
|
#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
|
|
1297
|
-
#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
|
|
1298
|
-
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
|
|
1299
1317
|
#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
|
|
1300
1318
|
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
|
|
1301
1319
|
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
|
|
@@ -1345,7 +1363,7 @@ static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
|
|
|
1345
1363
|
#endif
|
|
1346
1364
|
typedef Py_ssize_t __Pyx_compact_pylong;
|
|
1347
1365
|
typedef size_t __Pyx_compact_upylong;
|
|
1348
|
-
#else
|
|
1366
|
+
#else
|
|
1349
1367
|
#define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
|
|
1350
1368
|
#define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
|
|
1351
1369
|
#define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
|
|
@@ -1916,8 +1934,8 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int
|
|
|
1916
1934
|
#define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
|
|
1917
1935
|
#define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
|
|
1918
1936
|
#else
|
|
1919
|
-
#define __Pyx_Arg_NewRef_VARARGS(arg) arg
|
|
1920
|
-
#define __Pyx_Arg_XDECREF_VARARGS(arg)
|
|
1937
|
+
#define __Pyx_Arg_NewRef_VARARGS(arg) arg
|
|
1938
|
+
#define __Pyx_Arg_XDECREF_VARARGS(arg)
|
|
1921
1939
|
#endif
|
|
1922
1940
|
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
|
|
1923
1941
|
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
|
|
@@ -1933,8 +1951,9 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int
|
|
|
1933
1951
|
#else
|
|
1934
1952
|
#define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
|
|
1935
1953
|
#endif
|
|
1936
|
-
#define __Pyx_Arg_NewRef_FASTCALL(arg) arg
|
|
1937
|
-
|
|
1954
|
+
#define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
|
|
1955
|
+
to have the same reference counting */
|
|
1956
|
+
#define __Pyx_Arg_XDECREF_FASTCALL(arg)
|
|
1938
1957
|
#else
|
|
1939
1958
|
#define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
|
|
1940
1959
|
#define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
|
|
@@ -2571,7 +2590,7 @@ typedef struct {
|
|
|
2571
2590
|
#endif
|
|
2572
2591
|
void *defaults;
|
|
2573
2592
|
int defaults_pyobjects;
|
|
2574
|
-
size_t defaults_size;
|
|
2593
|
+
size_t defaults_size;
|
|
2575
2594
|
int flags;
|
|
2576
2595
|
PyObject *defaults_tuple;
|
|
2577
2596
|
PyObject *defaults_kwdict;
|
|
@@ -22004,11 +22023,11 @@ static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyO
|
|
|
22004
22023
|
{
|
|
22005
22024
|
int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
|
|
22006
22025
|
if (unlikely(eq != 0)) {
|
|
22007
|
-
if (unlikely(eq < 0)) return NULL;
|
|
22026
|
+
if (unlikely(eq < 0)) return NULL;
|
|
22008
22027
|
return kwvalues[i];
|
|
22009
22028
|
}
|
|
22010
22029
|
}
|
|
22011
|
-
return NULL;
|
|
22030
|
+
return NULL;
|
|
22012
22031
|
}
|
|
22013
22032
|
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
|
|
22014
22033
|
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
|
|
@@ -22121,7 +22140,7 @@ static int __Pyx_ParseOptionalKeywords(
|
|
|
22121
22140
|
if (*name) {
|
|
22122
22141
|
values[name-argnames] = value;
|
|
22123
22142
|
#if CYTHON_AVOID_BORROWED_REFS
|
|
22124
|
-
Py_INCREF(value);
|
|
22143
|
+
Py_INCREF(value);
|
|
22125
22144
|
Py_DECREF(key);
|
|
22126
22145
|
#endif
|
|
22127
22146
|
key = NULL;
|
|
@@ -22140,7 +22159,7 @@ static int __Pyx_ParseOptionalKeywords(
|
|
|
22140
22159
|
&& _PyString_Eq(**name, key)) {
|
|
22141
22160
|
values[name-argnames] = value;
|
|
22142
22161
|
#if CYTHON_AVOID_BORROWED_REFS
|
|
22143
|
-
value = NULL;
|
|
22162
|
+
value = NULL;
|
|
22144
22163
|
#endif
|
|
22145
22164
|
break;
|
|
22146
22165
|
}
|
|
@@ -22172,7 +22191,7 @@ static int __Pyx_ParseOptionalKeywords(
|
|
|
22172
22191
|
if (cmp == 0) {
|
|
22173
22192
|
values[name-argnames] = value;
|
|
22174
22193
|
#if CYTHON_AVOID_BORROWED_REFS
|
|
22175
|
-
value = NULL;
|
|
22194
|
+
value = NULL;
|
|
22176
22195
|
#endif
|
|
22177
22196
|
break;
|
|
22178
22197
|
}
|
|
@@ -24164,9 +24183,10 @@ static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
|
|
|
24164
24183
|
|
|
24165
24184
|
/* UnpackUnboundCMethod */
|
|
24166
24185
|
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
|
|
24186
|
+
PyObject *result;
|
|
24167
24187
|
PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
|
|
24168
24188
|
if (unlikely(!selfless_args)) return NULL;
|
|
24169
|
-
|
|
24189
|
+
result = PyObject_Call(method, selfless_args, kwargs);
|
|
24170
24190
|
Py_DECREF(selfless_args);
|
|
24171
24191
|
return result;
|
|
24172
24192
|
}
|
|
@@ -26131,7 +26151,7 @@ static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func,
|
|
|
26131
26151
|
default:
|
|
26132
26152
|
return NULL;
|
|
26133
26153
|
}
|
|
26134
|
-
return ((
|
|
26154
|
+
return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
|
|
26135
26155
|
}
|
|
26136
26156
|
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
|
|
26137
26157
|
{
|
|
@@ -26590,7 +26610,7 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
|
|
|
26590
26610
|
#else
|
|
26591
26611
|
py_code = PyCode_NewEmpty(filename, funcname, py_line);
|
|
26592
26612
|
#endif
|
|
26593
|
-
Py_XDECREF(py_funcname);
|
|
26613
|
+
Py_XDECREF(py_funcname);
|
|
26594
26614
|
return py_code;
|
|
26595
26615
|
bad:
|
|
26596
26616
|
Py_XDECREF(py_funcname);
|
|
Binary file
|