python-tutorial
python-tutorial copied to clipboard
Errors found in `library_numpy` notebok
Typo:
Exercises on specifying the data type.
- Create an array of 100 booleans all set to True. The array should have dimensions 2x3.
The part "The array should have dimensions 2x3." should be removed
In Indexing, slicing, and iterating
, the first sentence after the first python code starts with Unlinke
.
In the final exercises, when integrating the function we need to be explicit about the density of x points. Because different point density gives slightly different results. "Slightly different" means sufficient enough to cause the test failure.
For the exercise on eigenvalues:
- The solution uses
eigh
. If people useeig
the test will fail because the order of eigenvalues is different. This can be overcome by testing for invariants like the trace and the determinant. - The exercise should ideally be parametrized in order for multiple matrices to be teasd
In Exercises on NumPy routines, exercise 2., tests fail if we do not use the fact that the matrix is hermitian: eig and eigh give same eigenvalues but in different orders, and eigenvectors are slightly different
In Exercises on NumPy routines, exercise 2., tests fail if we do not use the fact that the matrix is hermitian: eig and eigh give same eigenvalues but in different orders, and eigenvectors are slightly different
Thanks, we already noted this above