You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix memory leak in `np.zeros` when fill-zero loop raises
BUG: Fix memory leak in np.zeros when fill-zero loop raises
Problem
PyArray_NewFromDescr_int in ctors.c leaks the data buffer when a
user-defined DType's fill-zero loop raises an error.
This affects any DType that defines a get_fill_zero_loop that can fail —
for example, a fixed-point DType whose fill-zero rejects zero because it
falls outside the type's representable range.
Fix incorrect temp elision for new-style (NEP 43) user-defined dtypes
Fix incorrect temp elision for new-style (NEP 43) user-defined dtypes
Summary
can_elide_temp() in temp_elide.c incorrectly identifies new-style user-defined
dtypes as numeric types eligible for in-place buffer reuse. For large arrays this
silently rewrites a*a + b*b into (a*a) += (b*b), which raises a TypeError
when the result dtype of the in-place add does not match the pre-allocated buffer.
NumPy PR: Fix `np.generic.astype` for parametric user-defined dtypes
NumPy PR: Fix np.generic.astype for parametric user-defined dtypes
Summary
scalar.astype(dst) silently fails for scalars belonging to parametric
new-style user-defined dtypes (introduced in NumPy 2.0). The intermediate
array NumPy creates internally uses the dtype's default descriptor rather
than the descriptor of the scalar instance, so setitem either rejects it or
stores wrong data. The fix is a one-function change to PyArray_DescrFromScalar
in numpy/_core/src/multiarray/scalarapi.c.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Somehow my BTRFS file system became corrupted by what appears to be a single bit flip in a metadata field. Rather than copying all the data and reformatting the file system, which would have required another disk at least as large as the original, I decided to try to fix this manually, which appears to have worked. I've documented the procedure I've used here, in case I need it again or someone else runs into a similar issue and finds it useful.
The first thing you should do is run btrfs check. For me this produced the following output:
Opening filesystem to check...
Checking filesystem on /dev/nvme0n1p1
UUID: ec7afe1c-8478-450a-82fc-d17b32d8ca3d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QProgressDialog with separate worker thread. Note that there's a possible reentrancy problem since setValue calls QApplication::processEvents.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters