We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 38e9f7b + ee4b7ea commit 841e3edCopy full SHA for 841e3ed
numpy/_core/_ufunc_config.py
@@ -167,6 +167,24 @@ def setbufsize(size):
167
size : int
168
Size of buffer.
169
170
+ Returns
171
+ -------
172
+ bufsize : int
173
+ Previous size of ufunc buffer in bytes.
174
+
175
+ Examples
176
+ --------
177
+ When exiting a `numpy.errstate` context manager the bufsize is restored:
178
179
+ >>> with np.errstate():
180
+ ... np.setbufsize(4096)
181
+ ... print(np.getbufsize())
182
+ ...
183
+ 8192
184
+ 4096
185
+ >>> np.getbufsize()
186
187
188
"""
189
old = _get_extobj_dict()["bufsize"]
190
extobj = _make_extobj(bufsize=size)
0 commit comments