Verifying bugs and bug fixes in NumPy
In this how-to you will learn how to:
Verify the existence of a bug in NumPy
Verify the fix, if any, made for the bug
While you walk through the verification process, you will learn how to:
Set up a Python virtual environment (using
virtualenv)Install appropriate versions of NumPy, first to see the bug in action, then to verify its fix
Issue 16354 is used as an example.
This issue was:
Title: np.polymul return type is np.float64 or np.complex128 when given an all-zero argument
np.polymul returns an object with type np.float64 when one argument is all zero, and both arguments have type np.int64 or np.float32. Something similar happens with all zero np.complex64 giving result type np.complex128.
This doesn’t happen with non-zero arguments; there the result is as expected.
This bug isn’t present in np.convolve.
: