File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
doc/release/upcoming_changes Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change
1
+ * Being fully context and thread-safe, ``np.errstate `` can only
2
+ be entered once now. It is possible to enter it again after
3
+ exiting first.
4
+ * ``np.setbufsize `` is now tied to ``np.errstate() ``: Leaving an
5
+ ``np.errstate `` context will also reset the ``bufsize ``.
Original file line number Diff line number Diff line change
1
+ ``np.errstate() `` is now faster and context safe
2
+ ------------------------------------------------
3
+ The `np.errstate ` context manager/decorator is now faster and
4
+ safer. Previously, it was not context save and had (rarely)
5
+ issues with thread-safety.
Original file line number Diff line number Diff line change @@ -156,6 +156,10 @@ def setbufsize(size):
156
156
"""
157
157
Set the size of the buffer used in ufuncs.
158
158
159
+ .. versionchanged:: 2.0
160
+ The scope of setting the buffer is tied to the `np.errstate` context.
161
+ Exiting a ``with errstate():` will also restore the bufsize.
162
+
159
163
Parameters
160
164
----------
161
165
size : int
You can’t perform that action at this time.
0 commit comments